Repository navigation
Conversation
|
Size Change: +1.07 kB (+0.01%) Total Size: 7.67 MB 📦 View Changed
|
39a4605 to
393f893
Compare
|
Flaky tests detected in ad403cc. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28850935121
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
On second thought, I think this PR can be closed. The fallback values for the |
What?
Follow up to #77462.
Adds default legacy
--wp-components-*color aliases to the generated@wordpress/themedesign token CSS.These aliases are compatibility defaults for consumers that still reference the old
@wordpress/componentscolor variables directly.ThemeProviderkeeps emitting the same provider-scoped legacy aliases as before, using the same shared alias definitions as the static CSS generation.Why?
The design token stylesheet is the static baseline for WordPress Design System tokens. Without these aliases, bare legacy references such as
var(--wp-components-color-accent)only resolve when a runtime provider or another legacy theme layer defines them.Adding low-specificity defaults to
design-tokens.cssfills that static compatibility gap without making the aliases new design tokens.Keeping the runtime provider bridge unchanged avoids adding custom-color tracking or cascade-sensitive runtime behavior just to support the static defaults.
How?
--wp-components-*aliases during the design token build.--wpds-*alias targets from the generated design token fallback map.--wp-admin-theme-color*targets.:where(:root)so they stay low specificity.ThemeProviderruntime legacy aliases in place for scoped theming.Testing Instructions
npm run --workspace @wordpress/theme build:tokensnpm run --workspace @wordpress/theme postbuildnpm run test:unit -- packages/theme/src/test/use-theme-provider-styles.test.tsxnpm run lint:js -- packages/theme/bin/build-design-tokens/index.ts packages/theme/src/legacy-color-aliases.ts packages/theme/src/test/use-theme-provider-styles.test.tsxnpx tsgo --build packages/theme/tsconfig.jsongit diff --checkKnown existing docs-lint noise:
npm run lint:md:docs -- packages/theme/README.md packages/theme/CHANGELOG.mdstill reports pre-existingMD033in the README andMD041/MD024in the changelog.Testing Instructions for Keyboard
No UI behavior changed.
Screenshots or screencast
Not applicable.
Use of AI Tools
Codex was used to help implement, test, and prepare this PR.