village-builder

VB-1532: Check: every theme defines every token

Status: done (2026-11-22) Priority: 2 Size: S Design ref: Kim, 22 November; VB-1161 Goal: A theme that misses a token fails npm test. Acceptance criteria:

Notes

Builds on VB-1530’s token list.

Done (VB-1532). tests/themes.js: a theme’s token block is a rule outside any @media with a selector part that is one compound carrying [data-theme="x"] (so :root[...], [...] and .theme-pv[...] all count, whatever VB-1531 widens to); a block under @media is an override (Glass dark) and need not be complete, but its theme must be in THEMES. A rule like :root[data-theme="mural"] .meter { --beads } is scoped, not a token block, and counts as base. Also checked: a custom property a theme block sets that is not in the list fails (keeps the list the one place a token is named). Defined outside the stylesheet: --x: in inline styles and setProperty('--x') of src/body.html and src/page/* (--on, --turn, …), so a var() the page sets does not fail. The list holds 40 tokens (not 50); both themes set all of them; no gap found, src/head.html unchanged.