Earlier this year, the CSS working group proposed a number of user preference media queries. One of these,
prefers-color-scheme, has been implemented by most popular browsers, and I’ve decided to support it on this website. In other words, this site now has a dark mode.
Well, at least I got my wish on one count. If you are not already viewing this site in dark mode and would like to, change your system theme to a dark one, and my site will automatically follow suite. If this is too drastic a step, and you use Firefox, you can instead do the following:
about:configinto your address bar, press Enter and click through the warning.
- Create a new entry by right-clicking anywhere and then navigating to New – Integer.
ui.systemUsesDarkThemeinto the first box and
1into the second.
- Refresh this page.
I’m not sure of a way to achieve this with Chrome.
Most of the colours were chosen by inverting the originals and fiddling until I was happy with the result. Dark mode is lower contrast than light mode, and will also fade images.1 If you notice anything weird, or have any suggestions for improvement, please let me know via webmention, email, Twitter, or whatever else.
Thanks to a couple of CSS Tricks articles. ↩︎