Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chessboard does not resize with css "media" rule #248

Open
marsianjohncarter opened this issue Jan 6, 2024 · 1 comment
Open

Chessboard does not resize with css "media" rule #248

marsianjohncarter opened this issue Jan 6, 2024 · 1 comment

Comments

@marsianjohncarter
Copy link

marsianjohncarter commented Jan 6, 2024

I am trying to to resize my chessboard with the user screen like this:

@media only screen and (max-width: 600px) {
  .chessboard {
    width: 300;
  }
}

This does not work though. After resizing the screen they will need to refresh the page, and my chess algorithm counts the player who "disconnected" the loser. Is there a way to resize the chessboard without refresh?

@cederlof
Copy link

After a resize you need to make the js-call: board.resize(). See: https://chessboardjs.com/examples/3007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants