fix(theme): one colour vocabulary — presets that resolved to nothing #122

Merged
peterswimm merged 1 commit from fix/palette-vocabulary into main 2026-09-11 13:42:15 +00:00
Owner

Found while looking at the Contact layout. The toilville theme carries two nearly disjoint palettes:

slugs
theme.json 27 — the vendored theme's own
styles/toilville.json 24 — the product palette, an FSE style variation
in both 6

The generated patterns bind to variation-only slugs (brand-primary, bg-surface-variant). The template parts I added in #118 bind to base-only ones (primary, primary-container, background, border, white).

So whichever style is active on the site, one of the two sets resolves to nothing — either core buttons render with no background, or the footer loses its warm band and every hairline. A missing preset isn't an error in WordPress: it emits nothing and the page still renders. That's why nobody caught it.

Two changes, so a reference resolves in either state

The chrome moves onto the product vocabulary the patterns already use. primary → brand-primary and background/white → bg-surface/text-on-accent are exact value matches. border → border-default and primary-container → accent-rituals-container are the same roles at #dddddd → 12% ink and #f7ebe7 → #F7EAE6.

theme.json gains the six product slugs any surface names, so the base palette is a superset rather than a rival. Its colour palette is hand-authored — wp_theme.py generates the style variations and this file's spacing/font presets, not its palette.

New gate

Covers patterns and parts, in both palette states. Verified red: dropping the six additions lists all six with the files that name them.

just check green; 293 tests pass; copy coverage still 100% on all five pages.

https://claude.ai/code/session_01Kbzfscp4w5enUrZxMnDt78

Found while looking at the Contact layout. The toilville theme carries **two nearly disjoint palettes**: | | slugs | |---|---| | `theme.json` | 27 — the vendored theme's own | | `styles/toilville.json` | 24 — the product palette, an FSE style variation | | **in both** | **6** | The generated patterns bind to variation-only slugs (`brand-primary`, `bg-surface-variant`). The template parts I added in #118 bind to base-only ones (`primary`, `primary-container`, `background`, `border`, `white`). So **whichever style is active on the site, one of the two sets resolves to nothing** — either core buttons render with no background, or the footer loses its warm band and every hairline. A missing preset isn't an error in WordPress: it emits nothing and the page still renders. That's why nobody caught it. ### Two changes, so a reference resolves in either state **The chrome moves onto the product vocabulary the patterns already use.** `primary → brand-primary` and `background`/`white → bg-surface`/`text-on-accent` are exact value matches. `border → border-default` and `primary-container → accent-rituals-container` are the same roles at `#dddddd → 12% ink` and `#f7ebe7 → #F7EAE6`. **`theme.json` gains the six product slugs any surface names**, so the base palette is a superset rather than a rival. Its colour palette is hand-authored — `wp_theme.py` generates the style variations and this file's spacing/font presets, not its palette. ### New gate Covers patterns **and** parts, in both palette states. **Verified red**: dropping the six additions lists all six with the files that name them. `just check` green; 293 tests pass; copy coverage still 100% on all five pages. https://claude.ai/code/session_01Kbzfscp4w5enUrZxMnDt78
fix(theme): one colour vocabulary — presets that resolved to nothing
Some checks failed
PR policy check / policy-gate (pull_request) Failing after 0s
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 21s
Test Generator / lint-workflows (pull_request) Successful in 24s
Copy coverage / Design copy reaching rendered HTML (pull_request) Failing after 25s
Test Generator / lint-prose (pull_request) Successful in 27s
Security Scans / Gitleaks secret scan (pull_request) Successful in 29s
Security Scans / Trivy filesystem scan (pull_request) Successful in 30s
Test Generator / test (pull_request) Failing after 49s
4c9b95d7b9
Found while looking at the Contact layout. The toilville theme carries TWO
nearly disjoint palettes:

  theme.json               27 slugs — the vendored theme's own
  styles/toilville.json    24 slugs — the product palette, an FSE style variation
  in both                   6

The generated patterns bind to variation-only slugs (brand-primary,
bg-surface-variant) and the template parts I added in #118 bind to base-only
ones (primary, primary-container, background, border, white). So whichever style
is active on the site, one of the two sets resolves to NOTHING: either core
buttons render with no background, or the footer loses its warm band and every
hairline. A missing preset is not an error in WordPress — it emits nothing and
the page still renders.

Two changes, so a reference resolves in either state:

  * the chrome moves onto the product vocabulary the patterns already use —
    primary -> brand-primary and background/white -> bg-surface/text-on-accent
    are exact value matches; border -> border-default and primary-container ->
    accent-rituals-container are the same roles at #dddddd -> 12% ink and
    #f7ebe7 -> #F7EAE6.

  * theme.json gains the six product slugs any surface names, so the base
    palette is a superset rather than a rival. (Its colour palette is
    hand-authored — wp_theme.py generates the style variations and this file's
    spacing/font presets, not its palette.)

New gate over patterns AND parts, verified red: dropping the six additions lists
all six with the files that name them.

Claude-Session: https://claude.ai/code/session_01Kbzfscp4w5enUrZxMnDt78
peterswimm deleted branch fix/palette-vocabulary 2026-09-11 13:42:15 +00:00
Sign in to join this conversation.
No description provided.