shaack / cm-chessboard

A JavaScript chessboard without dependencies. Rendered in SVG, coded in ES6. Views FEN, handles move input, animated, responsive, expandable
MIT License
209 stars 63 forks source link

SVGs with gradients don't work #119

Closed MrEnroke closed 1 year ago

MrEnroke commented 1 year ago

When using an SVG that contains gradients, these layers are not displayed. It is due to the use of "display:none" which does not allow the reference to the gradient ID to be used.

shaack commented 1 year ago

I will merge it. Thanks for your contribution.

shaack commented 1 year ago

If you created more open source sprites for the board I would also love to integrate them.

shaack commented 1 year ago

The method with "scale(0)" made problems, because of taking one line as space on the bottom of the page, so I will change it to:

wrapper.style.transform = "scale(0)"
wrapper.style.position = "absolute"
wrapper.setAttribute("aria-hidden", "true") // also hide for screenreades