Skip to content

docs: the design lives in @theme, and theme.json follows it - #7

Merged
ogorzalka merged 1 commit into
mainfrom
docs/theme-json-from-tailwind
Sep 28, 2026
Merged

ogorzalka merged 1 commit into
mainfrom
docs/theme-json-from-tailwind

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

The "Theme.json and Vite Build Integration" section of theming.md said the built theme.json carries all of Tailwind's shades, sizes xs–9xl and radii xs–4xl, offered in the editor. That was the defect fixed in Pollora/theme-apiary#11: some 290 colours nobody chose, and semantic presets defined as themselves.

The section now covers:

  • where the design lives: a @theme static block with concrete values, plus a :root rule pointing the colour utilities at the presets;
  • why not @import "tailwindcss" theme(static), and why no var(--wp--preset--…) inside @theme;
  • the base theme.json, which wins per slug, and must never receive the built file;
  • keeping a value out of Tailwind: one slug in theme.json, or a whole family with disableTailwind* (both measured);
  • what is not generated: spacing (--spacing vs WordPress's named scale) and layout widths;
  • the labels options.

The login screen section's note on var() presets is reworded to match.

Both behaviours described (base wins per slug, disableTailwind* uses the base as written) were measured on a build.

After merge: npm run sync-docs in pollora.dev, reviewing the diff file by file.

The page said the built theme.json carries all of Tailwind's shades, sizes
xs to 9xl and radii xs to 4xl, offered in the editor. That was the defect:
some 290 colours nobody chose, and semantic presets defined as themselves.

It now says how to declare the design (a static @theme with concrete values,
a :root rule pointing the utilities at the presets), why theme(static) must
not be used, that the base theme.json wins per slug, how to keep a value or a
family out of Tailwind, and what is not generated (spacing, layout).
@ogorzalka
ogorzalka merged commit df1570c into main Sep 28, 2026
@ogorzalka
ogorzalka deleted the docs/theme-json-from-tailwind branch September 28, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant