docs: the design lives in @theme, and theme.json follows it - #7
Merged
Merged
Conversation
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).
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.
The "Theme.json and Vite Build Integration" section of
theming.mdsaid the builttheme.jsoncarries all of Tailwind's shades, sizesxs–9xland radiixs–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:
@theme staticblock with concrete values, plus a:rootrule pointing the colour utilities at the presets;@import "tailwindcss" theme(static), and why novar(--wp--preset--…)inside@theme;theme.json, which wins per slug, and must never receive the built file;theme.json, or a whole family withdisableTailwind*(both measured);--spacingvs WordPress's named scale) and layout widths;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-docsin pollora.dev, reviewing the diff file by file.