DEV Community

Discussion on: How to Enable Dark Mode on Your Website with Pure CSS?

Collapse
 
dorshinar profile image
Dor Shinar

Nice one! I liked how you used input:checked to avoid using is!
One thing though, since CSS variables follow regular CSS cascading, you don't need to use complex queries like .light:checked + * > p, you can simply use .light:checked

Collapse
 
oahehc profile image
Andrew

Thanks for the hint. I simplify the example base on your suggestion.