The theme switcher conundrum

For a long time I had been of the opinion that theme switching in websites has only one approach: respect the user’s OS-level setting. This website took the same approach: whether you had light or dark mode on your system, this website would honour the appropriate mode.

However, I kept coming across a common argument against this approach: what if I want my system in dark mode but websites in light mode? This is not unthinkable. I always like to work on my documents in Pages with the page in light mode even thought the interface is dark. Oddly enough, Microsoft Word does not do that, choosing to make the page dark by default and having you switch to light mode deep inside the settings pane.

So I decided to ask a bunch of people on Mastodon what they thought. I targetted the UX communities I am part of with a poll carrying three options: stick to the OS-level setting; make your website’s own light and dark toggle; or have a bit of both with a three-way toggle. This last bit was my instinctive solution but I thought I would get the opinion of people more experienced in this than me. The results were interesting:

Poll on theme switcher solutions from Mastodon with 28% suggesting no switcher, 72% suggesting a three-way switcher and nobody suggesting a switcher independent of the OS

Nobody supported building a theme switcher independent of the system. This made sense on the one hand: your website has to play well with the rest of the system, not act adamantly independent of it. But it was also interesting because this was the solution before Apple made a theme switcher a system-level toggle. In no time (read, a few years) the norm became the shunned.

The omission of a switcher received decent support and was my choice until now. I had preferred this in the interest of simplicity.

Sometimes, choice is a good thing. If I want to help readers focus on reading, I might as well give them some choice of simplifying the environment in which they do their reading. This means more development and maintenance for me and it adds functionality without reducing the minimalist design language implemented on this site. If you do nothing, or if you set it to “Automatic”, the new theme switcher on this website behaves just as your OS tells it to.

The three-way switcher is not, to me at least, the one true path. I would still just as well ommit the switcher altogether if maintenance gets tough. But for now, have at it: open the menu and switch—and let me know if you find a bug I missed.

This is a note, a brief thought or reflection recorded for being meaningful or for sharing things of interest. Longer writings are in the essays section.