(no title)
ss64 | 1 year ago
/* Dark mode */ @media (prefers-color-scheme: dark) { ... }
The issue with both dark and light modes is so many designers seem to have jumped onto the idea that colour schemes have to be either bright white or darkest black.
I'd much rather see colours that are 'slightly darker' at night and 'slightly lighter' in the daytime. For one thing there are still so many websites with no colour schemes setup at all so if you avoid going to extremes it minimises the contrast difference.
bee_rider|1 year ago
ss64|1 year ago
Springtime|1 year ago
The optimal approach is applying the appropriate `prefers-color-scheme` using CSS alone, while additionally allowing a theme override using JS/storage. Fewer do this though, even though it wouldn't require any cookies and thus no consent dialog.
The worst are sites that only have theme switching gated behind registration.