Closed linrock closed 3 years ago
@linrock I had to add some more css rules to get arrows visible. I took these from the example in the current documentation:
.cg-wrap svg {
overflow: hidden;
position: relative;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 2;
opacity: 0.6;
}
.cg-wrap svg image {
opacity: 0.5;
}
EDIT: The CSS rule for arrows has been restored via #164
This adds CSS files to the chessground repo so devs can get to a fully-functional and styled chessboard quickly. For example, after
yarn install chessground
ornpm install chessground
you can do this to get a useable board:Here's an example of what the rendered board looks like from the above
index.html
file:I split the CSS into three files to separate out the base from the themes:
base.css
- positioning of board elementscolors.css
- board background SVG, interactive square colors, file/rank label colors (Lichess defaults)pieces.css
- embedded SVGs with the default Lichess piece setI'm happy to make any tweaks as needed. Fixes https://github.com/ornicar/chessground/issues/134