Repository navigation
ADR 0007
github-actions[bot] edited this page Nov 21, 2026
·
1 revision
Status: accepted · Built: done · Date: 2026-11-19 · Supersedes: 0005
Partly supersedes ADR 0005: its rule that prebuilt themes follow only the system setting. Built in scripts/build.ts.
ADR 0005 made prebuilt themes follow only the system's light or dark setting, and said a class mode would come if a site asked for it. The website (ADR 0006) asks: its previews switch each example between light and dark, and sites without Tailwind that have a theme toggle need the same.
This record replaces only ADR 0005's "prebuilt themes follow the system's light or dark setting".
- A prebuilt theme uses its dark colors when
<html>has thedarkclass, or when the system is dark and<html>doesn't have thelightclass. Otherwise it uses its light colors. -
color-schemefollows the same classes, so native controls and scrollbars match. - Without either class, nothing changes: the system setting decides, as before.
- A plain site gets a theme toggle by setting one class on
<html>. - Each prebuilt theme lists its dark colors twice (media query and class), about 2 kB more.
Published from docs/. Edit the files there; changes here are overwritten.