DEV Community

Discussion on: Using CSS variables to create a dark mode for your site

Collapse
 
eddsaura profile image
Jose E Saura

Interesting. Can we get the same with a user interaction? With a switch?

I think I've read something about it, maybe creating a parent class with .dark in the body or something like that.

Collapse
 
cchana profile image
Charanjit Chana

I wondered the same, but don’t really have an answer other than having to declare more specific variables and then creating a theme you can apply by switching classes.