prefers-color-scheme psa
Have some context from contrast beyond modes:
I'm one of those "cool kids who think dark mode is the thing" to where even my agave theme for bear blog defaults to dark mode. However, what can be done for people who prefer light mode like David? I use the
prefers-color-schemeCSS media feature to offer light mode to visitors whom defined that browser preference.
When using prefers-color-scheme, test your website via alternate modes to find and fix CSS markup that isn't working properly. That will save you and your visitors from fates like the following:
- My blog's unreadable light mode text from earlier this year.
- skryblan's unreadable dark mode block quotes at the time of writing, as seen in imitated intelligence.
- Andre's unreadable dark mode highlighted sections at the time of writing, as seen in Makefile for easy publishing of Ghost themes.