DEV Community

Discussion on: Conditional logic with CSS – The CSS custom property trick.

Collapse
 
siddharthshyniben profile image
Siddharth • Edited

That is a nice approach, but it's almost similar to directly setting the property like background-color: ... in the media query.

This is a basic demo but I added the complexity for understanding. I don't want people wondering "where did this undefined variable come from" etc.