Skip to content
card background pattern
Level 1

Modern CSS Design Systems

Unlock Full Course

$49.99 $29.99

Or

$24.99/Month

Super Easy Theming

Dark mode looks great and it is just as easy to make even more themes for our site with design tokens.
https://happyhues.co

Downloads

Comments

User photo avatar
Taeluf
2 months ago

Things broke when I moved my --vars from :root to .theme{}. My media query (for screen width > 600px) was targeting :root{}, so the --backgroundColor in the media query was overridden by the --backgroundColor now in my .theme{}. I changed the media query to target .theme instead of :root. Then had to move the media query BELOW .theme{} & everything was back to normal.

Really, only my background color was messed up, but I had my background color set to black in my :root{} (for some reason) & it left me horribly confused, thinking much more had gone wrong than what actually had.

Something to say?

Become a Pro