3 ms·
Is there a way to access it from javaScript? Can JS code set CSS --color and make it change.
by ape4 11y ago
Is there a way to access it from javaScript?
Can JS code set CSS --color and make it change.
- pygy_ 11y agoYes, it's mentioned in the article.
- saulr 11y agoIt looks like this can be changed with `setProperty`. There's a demo[1] that works on Firefox 31+ and Chrome 49+ [1] https://www.broken-links.com/2014/08/28/css-variables-updating-custom-properties-javascript/ https://www.broken-links.com/2014/08/28/css-variables-updati...
- ape4 11y agoThanks. I wonder if it could be creatively misused to act as a database.