Comment by AndrewStephens
24 days ago
This is a good thing.
I added dark mode to my blog a while ago and it was a little trying to do properly.
You can implement a half-assed dark mode yourself by adding the following css.
@media(prefers-color-scheme: dark) {
body {
filter: invert();
}
}
All your images will be inverted as well, which doesn’t work well for photos.
For images. Works better for illustrations to get the vibe of the original colours than actual photographs.
Yep! That’s what is my dark mode userscript too. Reference for anyone interested in more details. https://monochrome.sutic.nu/2024/02/25/hue-preserving-invert...
The opt outs mentioned in the article, like
should be sufficient to enable dark mode for users who prefer dark mode.
For icons, ideally they’d be SVGs controlled by currentColor, but that may not be feasible or convenient depending on your setup.
Please do not use invert; it messes up subpixel rendering, making text ugly and harder to read.