hcodes / snowflakes

❄️ Falling snowflakes
https://hcodes.github.io/snowflakes/examples/constructor
MIT License
356 stars 58 forks source link

Support CSS custom properties as `color` value #73

Open odnamrataizem opened 3 weeks ago

odnamrataizem commented 3 weeks ago

I'm trying to set the snowflakes' color using CSS custom properties (var(--my-custom-property)) to make it easier to account for light and dark modes, but this seems not to currently work.

This isn't necessarily related to #35, as a possible fix might be inlining the SVG images into the DOM instead of using them as a background-image.

hcodes commented 3 weeks ago

Inline SVG for snowflakes increases the number of nodes, may lead to a decrease in performance, there may be a lot of snowflakes on the page. I will try to close issue #35