lichess-pgn-viewer
Version:
PGN viewer widget, designed to be embedded in content pages.
58 lines (54 loc) • 2.82 kB
CSS
cg-board {
background-color: var(--board-color);
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4PSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIgogICAgIHZpZXdCb3g9IjAgMCA4IDgiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyI+CjxnIGlkPSJhIj4KICA8ZyBpZD0iYiI+CiAgICA8ZyBpZD0iYyI+CiAgICAgIDxnIGlkPSJkIj4KICAgICAgICA8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZSIgb3BhY2l0eT0iMCIvPgogICAgICAgIDx1c2UgeD0iMSIgeT0iMSIgaHJlZj0iI2UiIHg6aHJlZj0iI2UiLz4KICAgICAgICA8cmVjdCB5PSIxIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBpZD0iZiIgb3BhY2l0eT0iMC4yIi8+CiAgICAgICAgPHVzZSB4PSIxIiB5PSItMSIgaHJlZj0iI2YiIHg6aHJlZj0iI2YiLz4KICAgICAgPC9nPgogICAgICA8dXNlIHg9IjIiIGhyZWY9IiNkIiB4OmhyZWY9IiNkIi8+CiAgICA8L2c+CiAgICA8dXNlIHg9IjQiIGhyZWY9IiNjIiB4OmhyZWY9IiNjIi8+CiAgPC9nPgogIDx1c2UgeT0iMiIgaHJlZj0iI2IiIHg6aHJlZj0iI2IiLz4KPC9nPgo8dXNlIHk9IjQiIGhyZWY9IiNhIiB4OmhyZWY9IiNhIi8+Cjwvc3ZnPg==');
}
/** Interactive board square colors */
cg-board square.move-dest {
background: radial-gradient(rgba(20, 85, 30, 0.5) 22%, #208530 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
cg-board square.premove-dest {
background: radial-gradient(rgba(20, 30, 85, 0.5) 22%, #203085 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
}
cg-board square.oc.move-dest {
background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 85, 0, 0.3) 80%);
}
cg-board square.oc.premove-dest {
background: radial-gradient(transparent 0%, transparent 80%, rgba(20, 30, 85, 0.2) 80%);
}
cg-board square.move-dest:hover {
background: rgba(20, 85, 30, 0.3);
}
cg-board square.premove-dest:hover {
background: rgba(20, 30, 85, 0.2);
}
cg-board square.last-move {
background-color: rgba(155, 199, 0, 0.41);
}
cg-board square.selected {
background-color: rgba(20, 85, 30, 0.5);
}
cg-board square.check {
background: radial-gradient(
ellipse at center,
rgba(255, 0, 0, 1) 0%,
rgba(231, 0, 0, 1) 25%,
rgba(169, 0, 0, 0) 89%,
rgba(158, 0, 0, 0) 100%
);
}
cg-board square.current-premove {
background-color: rgba(20, 30, 85, 0.5);
}
/*/1** Alternating colors in rank/file labels *1/ */
/*.cg-wrap.orientation-white coords.ranks coord:nth-child(2n), */
/*.cg-wrap.orientation-white coords.files coord:nth-child(2n), */
/*.cg-wrap.orientation-black coords.ranks coord:nth-child(2n + 1), */
/*.cg-wrap.orientation-black coords.files coord:nth-child(2n + 1) { */
/* color: rgba(72, 72, 72, 0.8); */
/*} */
/*.cg-wrap.orientation-black coords.ranks coord:nth-child(2n), */
/*.cg-wrap.orientation-black coords.files coord:nth-child(2n), */
/*.cg-wrap.orientation-white coords.ranks coord:nth-child(2n + 1), */
/*.cg-wrap.orientation-white coords.files coord:nth-child(2n + 1) { */
/* color: rgba(255, 255, 255, 0.8); */
/*} */