Instant dark theme
Thanks to Jacksons update to darktheme.club, I just came across a neat little CSS property that turns a mostly CSS-free document into a pleasantly dark site:
:root {
color-scheme: light dark;
}
This will adjust all elements on the page to the color scheme preferred by the user - without any other custom styles! 🤯 It is also widely supported by browsers.
I've always been quite dependent on CSS-frameworks for any project I'm starting. Going forward, I'd be interested to see how framework-less sites would feel using this property. If all else fails, there's always the awesome simple.css library, which you can slap on top of a raw document to make it pretty (and dark, if preferred) without using custom classes.
This is post 064 of #100DaysToOffload.