2019-08-30 Dark Mode

If you’re a regular reader of this site, and you prefer “dark mode” in your browser, you you should be getting a “dark” theme, now. I hope it works. Let me know if anything looks weird.

The 2019 CSS file uses the prefers-color-scheme media feature to change colours:

2019 CSS file

prefers-color-scheme media feature

@media (prefers-color-scheme: dark) {
    body, rss {	color: #eeeee8; background-color: #333333; }
    a { color: #1e90ff }
    a:hover { color: #63b8ff }
    a:visited { color: #7a67ee }
    input, input[type="text"], textarea {
	color: #eeeee8; background-color: #555;
	padding: 0.5ex;
	font-size: 80%;
	line-height: 125%;
    }
    img { opacity: .75; transition: opacity .5s ease-in-out; }
    img:hover { opacity: 1; }
    /* ... some stuff removed ... */
}

How to change your theme preferences depends on your operating system. Yes, it’s not a browser setting! For Windows: Settings → Preferences → Colors. For macOS: System Preferences → General → Appearance → Dark. For Android: Quick Settings → Dark Theme. For Gnome: use Tweaks (a separate app!) to change to a theme with “dark” in the name (e.g. “adwaita-dark”). The See Also section on the MDN page for `prefers-color-scheme` has more information.

Tweaks

See Also section

If you’re a Firefox user, this requires Firefox 67, not ESR.

This is what it looks like:

Dark Mode

Light Mode

​#CSS

Comments

(Please contact me if you want to remove your comment.)

In `about:config`, for *Reader Mode*:

+---------------------+-------+
|       Setting       | Value |
+---------------------+-------+
| reader.color_scheme | dark  |
+---------------------+-------+

– Alex Schroeder 2019-10-01 10:59 UTC