village-builder

VB-1530: Refactor: the themes’ tokens: fonts, panel, border, shadow and button shape as variables the base uses

Status: done (2026-11-22) Priority: 2 Size: M Design ref: Kim, 22 November; VB-1161 Goal: A theme is mostly a set of token values: the base stylesheet’s literals of colour, radius and font become variables each theme sets. Acceptance criteria:

Notes

Builds on VB-1529. The token list this task writes is what VB-1532 checks, so keep it machine-readable: one token a line, --name: what it is.

Done (VB-1530). 50 tokens in seven groups at the head of src/head.html; Glass light sets all of them in :root[data-theme="glass"] (no longer the bare :root, so the block widens to [data-theme="glass"] for VB-1531), Glass dark the colours it changes, Mural all of them. New beside the brief’s: --plate (a portrait’s ground), --r-row, --r-meter, --r-portrait, --r-tag, --head-style, --head-ink, --panel-side, --panel-rise (a bottom panel’s upward shadow), --btn-on-edge, --float (a round button over the map; Mural sets Glass’s value, as it shared it). Literals (base, theme previews left to VB-1531): colour 37 to 31, the 31 kept being on the sea or the map (veils, vignette, loader, the level-of-detail line, the game’s name: 13), the map’s keys, swatches, pins and the start’s pictures (16), and two shadows Mural shares unchanged (the eye’s, the phone’s speed popup). border-radius 79 to 64: 13 circles, 5 pills, 23 of 4px or less (swatches, keys, link outlines, bars), 23 Glass sizes of a piece that Mural either redraws in its own shape (tabs, story, dock, action bar, person, row, card, the menu’s round buttons) or inherits as it is (sum-go, stepper, banner, customs, card switch, work box, offer, editor fields): a token there would square them in Mural. Font: all but .supply-more’s Georgia ellipsis; the sans stacks became the body’s one stack, the same face when Alegreya Sans loads. Mural, :root[data-theme="mural"] selectors 125 to 119: gone the heads’ rule (tokens --head, --head-style, --head-ink), the panel’s band (panel tokens), the button and primary rules (button tokens), three pressed-border rules (--btn-on-edge); declarations gone from kept rules: radii of act-row, supply-nums, meter, meter fill, supply cell, badge, pin tag; badge and mini grounds (--plate); a pin’s cast; act-bar button’s and start card’s border. A .loader p weight rule stays (Glass’s is 400). Pressed buttons that Mural leaves with no ink edge (debug row, play switches, culture chip, card switch, supply-more, editor tools) keep transparent rather than --btn-on-edge, to keep Mural’s look. Look: 18 screenshots (as VB-1529) and the computed style of every element in each of the 18 states, plus the menu at 390 by 844 in each theme: pixels identical but the known 74 px noise patch, styles identical but the sans stack’s name and the level-of-detail line’s width (it differs between two runs of one build).