An Interest In:
Web News this Week
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
February 21, 2020 07:38 pm GMT
Original Link: https://dev.to/adam_cyclones/can-css-variables-be-watched-need-a-smart-cookie-104g
Can CSS variables be watched, (need a smart cookie)
The best thing since sliced bread and absolutely the most revolutionary thing I have seen in my time as Dev, is CSS variables, it's shocking because it's something that should have been there from day one.
Let's get to the question, given I can get and set CSS variables in JavaScript , can I also watch for changes to the CSS values on the fly?
Other than polling, are there any ways to observe a live CSS variable change?
onCustomPropertyChange
I think the answer is no.
Original Link: https://dev.to/adam_cyclones/can-css-variables-be-watched-need-a-smart-cookie-104g
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To