Skip to content
Affective
← Updates

This site shipped, and immediately broke dark mode for everyone

2026-09-15

Archived build note. This records what was known at publication; the active person-state program and voice gates have since moved. Read the current status.

What happened

Building this site was the first time any Tailwind surface rendered in dark mode. Body copy came out light-mode ink on the dark canvas. The kit's token CSS looked correct in isolation: light values, dark values, both defined. The failure was that Tailwind utilities never referenced the vars; the @theme inline block baked literal light hexes into every utility class, so [data-theme="dark"] overrides could never reach them.

The fix, and what it surfaced

Fix: emit the theme block non-inline so utilities resolve var(--color-*) at use-site. While in there: the default Tailwind palette reset that the decision log claimed was in place had never actually been emitted, and the type scale is now exposed as real utilities (text-display-xl and friends) instead of hand-written pixel classes.

Both bugs are the kind that only a render catches; the CSS looked fine in isolation.