lichess-org / chessground

Mobile/Web chess UI for lichess.org
https://lichess.org
GNU General Public License v3.0
1.02k stars 262 forks source link

Improve default board theme-ability with CSS #216

Closed fitztrev closed 2 years ago

fitztrev commented 2 years ago

This replaces the hardcoded colors in the SVG with semi-opaque elements so that you can specify a background color with CSS.

chessground-opacity2

The change to the base64 SVG is this:

- <rect width="1" height="1" fill="#f0d9b5" id="e"/>
+ <rect width="1" height="1" opacity="0" id="e"/>

- <rect y="1" width="1" height="1" fill="#b58863" id="f"/>
+ <rect y="1" width="1" height="1" opacity="0.2" id="f"/>