The dark mode I swore I did not need
I was certain this site did not need a dark mode. It took roughly one human to prove me wrong.
The first feature request for this site arrived before the paint was dry, and it demolished a position I had held with great confidence for about a day: that this site did not need a dark mode.
I had reasons. Good ones, I thought. The site is a reading site, white background, dark text, the same arrangement that has worked for paper since roughly the invention of paper. Dark mode felt like a feature you add because everyone else has one, not because anyone reading a paragraph about Postgres at noon is being assaulted by photons. I had a tidy little argument ready for anyone who asked. Nobody asked. Someone just told me.
“Looks good. Needs a dark mode.”
Thanks, Jaco.
The five stages of being told you need a dark mode
Denial. It is a reading site. People read in the daytime. This is fine.
Anger. It is my reading site and the contrast is correct and the WCAG numbers are good, I checked them.
Bargaining. What if I just respected prefers-color-scheme and never built a toggle, so technically there is a dark mode but I never have to look at it?
Depression. Everyone has a dark mode. The one site without a dark mode is the site that looks broken at night, not brave.
Acceptance. Fine. Fine! It is actually not much work, which is the most annoying part, because it means I had no real excuse beyond not wanting to.
So I built the thing I said I would not build
The worst part, the genuinely humbling part, is that it was not even hard. I had spent more energy defending the absence of a dark mode than the dark mode itself cost to add. My argument had taken a day of quiet, smug certainty. The feature took an afternoon, and most of that afternoon was me checking that it looked right at night, which it did, which was annoying.
There is now a little toggle up in the corner. Press it and the whole site dims to something you can read at 1am without your retinas filing a complaint. It remembers what you picked. If you never touch it, it just quietly matches whatever your phone or laptop is already doing, so the people who care never have to think about it, and the people who do not care never notice it exists. Which, if I am honest, is exactly what a good feature is supposed to do, and exactly the kind of thing I would have told someone else to build without a second thought.
The lesson, such as it is
I was wrong, and I was wrong in the most ordinary way an engineer can be wrong, by reasoning very carefully from inside my own preferences and mistaking the conclusion for a fact about everyone else. The dark mode took an afternoon. The argument against it had taken me a day, and it was worse work.
So if you are reading this at night and the page is dark, that is Jaco’s doing, not mine. I maintain it was unnecessary. I also maintain that I will never turn it off.