Status: done (2026-11-22) Priority: 2 Size: S Design ref: Kim, 22 November; VB-1161 Goal: Adding a theme needs no hand-written preview card and no edit to a test’s count. Acceptance criteria:
data-theme="<key>" and the theme blocks apply to any element with the attribute (not only :root), so the sample shows its theme whatever theme is on..theme-pv.glass and .theme-pv.mural colours are gone from src/head.html; a sample is built from the shared pieces (a panel, a head, a pressed and an unpressed button).tests/page.js counts the themes from THEMES (or from the cards drawn), not the literal 2, and walks each: setting it sets the root’s attribute and keeps it in localStorage.THEMES and a token block; the steps are written in docs/architecture/modules.md, Adding things.npm run verify, node tests/page.js and node tests/smoke.js green.Builds on VB-1530’s tokens.
Done (VB-1531). The three token blocks lost :root ([data-theme="glass"], its dark block under the media query, [data-theme="mural"]); the bare :root after Glass’s block sets only color-scheme: light, and Glass dark’s block, now of equal weight, comes after it, so the root’s tokens are unchanged. Mural’s own pieces stay under :root[data-theme="mural"].
The sample is <span class="panel" data-theme="k"> with a head (--head, --head-style, --head-ink) and two buttons drawn with --btn-*, the first pressed; no colour of a theme is written in its rules. The checkerboard ground behind it stays (it stands for the map).
tests/page.js exposes THEMES by a fourth patch of the built page, counts the cards against its keys and walks each (glass last): the root’s theme and icons, aria-checked, the kept choice, and the sample’s data-theme.
Look: menu, Options, choice of whom to play and the played game, Glass light, Glass dark and Mural, 1440 by 900: identical by pixel but the two cards’ samples. They changed: Glass dark’s sample is now dark (it was always light); Glass’s sample has the panel’s blur and shadow and a taller padding (9px, Mural’s band needs it); Mural’s buttons are its leaf-shaped buttons (--btn-radius) instead of ringed medallions; the head is 15px in both (14 and 16 before).