Home›Zach Leatherman›Article

Trying out a Two-state Dark Mode Toggle

Zach Leatherman · Sep 11, 2026

Update

I made some updates and released it as a web component: details in Solar Eclipse Toggle, a Dark/Light mode Toggle Web Component.

Lea Verou sparked some lovely discussions about dark/light mode toggles by asking a simple question: do these form controls need three options for two user-facing states?

Keep reading

Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.

More from Zach Leatherman

Your Tools are Hiding npm Audits from You

Meaningful Audits are Important Look at these two npm audit outputs generated this morning and tell me which project is more secure: $ npm audit # uh… 521 lines of vulnerability reports truncated 78 vulnerabilities (7 low, 23 moderate, 46 h

All of my 300+ browser tabs are beautiful

I am a habitual tab hoarder so I created a Firefox addon to help me manage every one of my very special browser tabs. Sort tabs by oldest, unload them, find duplicates, and consolidate tabs to a single window — buncha useful stuff in there!

“AI, make the website good”

Millions of Large-Language-Model-generated words have been spilled on craftsmanship in this gilded-age of software development. We now have agents to plan how code will be written, agents to write code, agents to review code, agents to orch

Icon Fall Web Component

I’ve been doing some spring/fall cleaning and found an unpublished follow-up component to <snow-fall> (a web component to “snow” on your website — which also happens to work with emoji too). Originally it was created as an easter egg for Bl

Table of Contents Web Component

…and another one. This little (zero CSS) web component has two modes: progressively enhance a hierarchy of server rendered <ol> or <ul> elements (or conveniently client render them for you if they don’t exist) to highlight which are current