fix: keep the palette to the theme's own colours, each with a value - #11
Merged
Merged
Conversation
The palette offered authors some 290 Tailwind colours, and its semantic colours resolved to nothing. - `theme(static)` made Tailwind emit its whole default scale, which the theme.json plugin copies into the palette. It is gone; the @theme block is `static` instead, so every token of the theme reaches the palette. - A build step copied the generated theme.json over the base one. The base wins over @theme on the next build, so the palette froze: edits to app.css never reached it. The step is removed and the base holds no palette. - The semantic colours were var(--wp--preset--color--<slug>, <fallback>), copied as is: a preset defined as itself, a cycle CSS drops. @theme holds concrete colours now, and a :root rule points the utilities at the presets, so a palette edited in the Site Editor still reaches the theme. - The last scale colours in use move to tokens: rating stars to accent, the grey texts to foreground and muted.
The base theme.json still held the font sizes, fonts and radii an earlier build had copied from Tailwind's defaults. The base wins over @theme, so a change to --text-lg or --radius-lg in app.css reached the front end and never the editor. The base holds none of them now. @theme declares the scale the theme uses, with Tailwind's values, so nothing changes on the page: sizes xs to 5xl (6xl to 9xl were never used), radii xs to 2xl, and the sans and mono fonts. The editor shows them under readable labels.
This was referenced Sep 28, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
red-50tostone-950), 13 font sizes and 8 radii, all Tailwind defaults nobody chose.primary,accent,surface…) resolved to nothing: a block coloured "Primary" was transparent, on the page and in the editor.--text-lgor--radius-lginapp.csschanged the page, never the editor.Causes
@import "tailwindcss" theme(static)emitted Tailwind's whole default theme, whichwordpressThemeJsoncopies intotheme.json.copy-theme-jsonVite step copied the builttheme.jsonover the base one. The base wins on a duplicate slug, so the palette, sizes and radii froze.var(--wp--preset--color--<slug>, <fallback>), copied as is: a preset defined as itself, a cycle CSS discards.Changes
@import "tailwindcss";@theme staticdeclares the theme's colours, type scale (xs–5xl), radii (xs–2xl) and fonts (sans,mono) with concrete values. Tailwind's values are kept, so nothing changes on the page.@layer base :rootrule points the colour utilities at the WordPress presets, so a palette edited in the Site Editor still reaches the theme.theme.jsonholds no palette, sizes, fonts or radii.yellow-400→accent, grey texts →foreground/muted.theme.json, or adisableTailwind*option).editor.spec.ts: thetest.failmarker on the semantic colours is removed; the palette test now also checks thatred-500is absent.Checked on pollora-test
apiary/ci-dynamicnot scaffolded), 1 failed: "simple product", because the local copy lacks Walk the shop and the editor in a browser #8, not related.Documentation: Pollora/documentation and theme-default follow the same model (linked PRs).