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

pieceStyle == merida does not work to overwrite default CSS style #345

Open
mliebelt opened this issue Feb 16, 2022 · 1 comment
Open

pieceStyle == merida does not work to overwrite default CSS style #345

mliebelt opened this issue Feb 16, 2022 · 1 comment

Comments

@mliebelt
Copy link
Owner

I tried to overwrite the (in CSS set) pieceStyle wikipedia by setting the pieceStyle explicitly in the configuration or in the div. For an unknown reason, this is not possible. It does work for all other pieceStyles.

@mliebelt
Copy link
Owner Author

I analysed a little bit, and now I seem to understand, what is the case here. When using the background-image CSS rule, the rules don't overwrite each other. So images will be stacked on each other, with unwished consequences to the user. I will create some examples (not chess related), that show that using 2 background images with the same size on top of each other is not what can be done easily.

So the order of the CSS rules (in the file) seem to denote which pieceStyle can overwrite which other style, which is of course not meaningful for the user. Very strange, and I have no idea how to fix that.

My recommendation on this is to

  • use only one pieceStyle in the CSS of your HTML page, if you want to set it globally for all the chessboards shown anywhere, but don't try to set them individually then XOR
  • use for each chessboard the attribute pieceStyle, but avoid setting it in the CSS of the your HTML page then.

The first one is done by Lichess, when the user sets the pieceStyle in his personal settings. All boards are adjusted automatically, but there is no way to have some of them different.

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

No branches or pull requests

1 participant