DEV Community

Discussion on: Light and dark mode in just 14 lines of CSS

Collapse
 
inspiredlabs profile image
Inspired Labs - London, United Kingdom

Exactly! Using var(--color-bg, inherit) uses the browser's fallback value. Perhaps one day, browsers will simply have a algo to do this themselves, such as Luma: css-tricks.com/switch-font-color-f...