Stabilization review of @wordpress/theme, aggregating the original assessment with a fresh validation pass against the current source (v0.13.0). Items shipped since the first pass are listed as done.
Done
Bugs
API design
Architecture and implementation
Testing
Tokens
Naming and structure:
Values and content:
Priorities
- Block stabilization: B1, B2, B5, A1+A2.
- High priority: A3, A8, B3, B4, I2, I3, T-N1, T-N3.
- Medium: T1, T2, A5, A6, A7, I5, T-M5, T-M7.
- Low / token cleanup: T-D1, T-D4, T-V1, T-V4, T-X3, T3.
Original detailed assessment (April 2026)
The first iteration of this review lives in the issue's revision history and discussion thread above. It contained additional commentary on items that have since been resolved (color-space registration, motion tokens, seed parsing) plus lower-priority token-level observations not repeated here.
Stabilization review of
@wordpress/theme, aggregating the original assessment with a fresh validation pass against the current source (v0.13.0). Items shipped since the first pass are listed as done.Done
--wpds-motion-duration-*and--wpds-motion-easing-*tokens (#76097).Bugs
legacyWpComponentsOverridesCSScontains onlyvar(...)references; emit it once at:rootin the prebuilt CSS.legacyWpAdminThemeOverridesCSSshould only be emitted whencolor.primaryis user-provided (WP Core already provides the defaults). Theme: Provide design-system token defaults without a runtime<ThemeProvider>#78664addFallbackToVarbetweenpostcss-plugins/add-fallback-to-var.tsandpostcss-plugins/ds-token-fallbacks.mjs. @wordpress/theme: deduplicate addFallbackToVar helper #78666API design
ThemeProvidera public runtime export. Drop the type-only re-export fromindex.ts, removeThemeProviderfromprivateApis, and migrate consumers inpackages/bootandpackages/ui/**/popup.tsxoffunlock( themePrivateApis ).ThemeProvider.useThemeProviderStylescan remain private. Theme: Promote ThemeProvider to stable API #78958cautiononly hassurface*/fgSurface*entries while other status tones havestroke*entries. Either add--wpds-color-stroke-surface-caution(-strong)or document the intentional asymmetry. Theme: Add stroke-surface tokens for the caution tone #79198color.primary/color.bg(currently "hex,rgb(...), or CSS color keyword") to match the runtime, or relax the docs. Today the runtime accepts anything parseable in sRGB. Theme: Enforce sRGB seed-color input contract for ThemeProvider #79148react: ^18.0.0) for React 19 compatibility before stabilizing. (Update: @wordpress/theme: overall API and architecture assessment #77462 (comment))ThemeProvider: Renamecolor.bgtocolor.backgroundtheme/ThemeProvider: renamecolor.bgprop tocolor.background#79007Architecture and implementation
styleon the wrapper instead of injecting a per-instance<style>element. Removes the doubled-class specificity hack, removes the<style>element in the common case, and removes one DOM node per provider. ForisRoot, write todocument.documentElement.stylein auseLayoutEffectwith cleanup — no need for:root:has(...). Theme: apply ThemeProvider styles inline (I2) #78678data-wpds-root-provider=\"false\"on every non-root provider. Usedata-wpds-root-provider={ isRoot || undefined }(or drop the attribute altogether after I2). Theme: Skip serializingdata-wpds-root-provider="false"on non-root providers #79253getCachedBgRamp/getCachedAccentRamp.buildAccentRamp(seed, bgRamp)keys on both arguments and relies on the upstreambgRampmemo to keep references stable. Worth a comment near the cache declarations. Theme: Document ramp memoization contract #79459Testing
ThemeProvider/useThemeProviderStyles: defaults, inheritance forcolor/cursor/density(after B1), nested providers, and theisRootselector. Theme: Add tests for ThemeProvider and useThemeProviderStyles #79126child_process.execto the stylelint Node API for speed and reliability. Theme: Run stylelint plugin tests via the Node API #79199src/prebuilt/css/design-tokens.cssmatches what the build would produce, to catch stale generated files. (Update: Already exists as of Theme: Ensure build artifacts are synced in version control #73894)Tokens
Naming and structure:
--wpds-dimension-basefrom the public surface (or keep it private). It is a primitive and shouldn't be exposed (see earlier discussion).--wpds-dimension-basefrom the public token surface #79254--wpds-color-stroke-focus-brand→--wpds-color-stroke-focus. Drop the-brandsegment unless other focus variants are introduced (breaking). Theme: Rename--wpds-color-stroke-focus-brandtoken to--wpds-color-stroke-focus#79125stroke-interactive-brand-disabled,bg-interactive-brand-strong-disabled) for parity with neutral. Theme: Add disabled variants for brand and error interactive color tokens #79124bgtobackgroundandfgtoforegroundin tokens theme: renamebg/fgdesign token groups tobackground/foreground#79098Values and content:
@wordpress/theme: approach to dimension tokens and density #74556) — Theme: dropdensitysupport from@wordpress/theme#78741Priorities
Original detailed assessment (April 2026)
The first iteration of this review lives in the issue's revision history and discussion thread above. It contained additional commentary on items that have since been resolved (color-space registration, motion tokens, seed parsing) plus lower-priority token-level observations not repeated here.