Skip to content

Is it possible de watch updates on a CSS Variable ? #3570

Answered by e111077
Mushr0000m asked this question in Q&A
Discussion options

You must be logged in to vote

Lit does not do anything special with CSS variables & custom properties, and unfortunately the web platform does not have the feature to watch CSS custom properties changing.

I'll mark this question as answered since this answers the question directly, but please leave a comment on my response with what you're trying to achieve, because there may be a better way to do what you're trying to do that does not involve listening for custom prop changes.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@justinfagnani
Comment options

Answer selected by e111077
Comment options

You must be logged in to vote
1 reply
@justinfagnani
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants