Issue 409
Theme options contract with a decoration slot (part of #370)
Back to our planDone
enhancementfrontendstylingpriority: high
Problem
Decision 0012 point 4 and #370 step 5: tokens cover colours, radius and fonts, but not what a seasonal theme also wants (an ornament or effect layer, later header/footer variants). There is no typed place for a theme to say "use this decoration", so each one would be a one-off edit to the layout.
Proposed fix
A small theme-options contract in src/platform/theme/, as decided on #370 (owner, 2026-10-25: a small interface so the code can be adapted quickly; 2026-10-26: start on those now and complete as many as possible):
ThemeOptionstype with a default for every option;resolveThemeOptions()fills in the defaults, so a token-only theme needs no code.- A registry of themes (name → options), checked against the folders in
src/themes/by a test. - First option:
decoration, rendered by one slot in the frontend layout (<ThemeDecoration />): decorative only (aria-hidden, no pointer events), CSS-only, and off with reduced motion. First decoration:snowfall. The default theme sets none, so nothing changes on the site. - The active theme stays fixed per build until runtime switching (#370 step 4); one constant names it.
Keep the option list short: each option is permanent API.
Acceptance criteria
- Not done:
ThemeOptions, defaults andresolveThemeOptionsinsrc/platform/theme/, with tests. - Not done: A registry test fails when a theme folder has no registry entry or the reverse.
- Not done: The layout renders the decoration slot; with the default theme the site looks the same (screenshots).
- Not done:
snowfallrenders as a decorative, motion-safe layer (test + local screenshot with a demo theme). - Not done: Docs: architecture README and decision 0012 references.
Area
frontend, styling
Priority
high
Generated by Claude Code, opens in a new tab