chessboardjs icon indicating copy to clipboard operation
chessboardjs copied to clipboard

Chessboard does not resize with css "media" rule

Open loeclos opened this issue 1 year ago • 1 comments

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?

loeclos avatar Jan 06 '24 00:01 loeclos

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

cederlof avatar May 21 '24 06:05 cederlof