You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Theme: Add disabled variants for brand and error interactive color tokens (#79124)
* Theme: Add disabled variants for brand and error interactive color tokens
Add `disabled` variants for the `brand` and `error` tones across the
interactive `bg`, `fg`, and `stroke` color tokens, mirroring the existing
tone-agnostic `neutral` disabled tokens. This brings brand/error to parity
with neutral (T-M5).
* Theme: Make disabled token descriptions tone-specific and adopt them in consumers
Now that brand/error tones have their own disabled tokens, reword the
disabled `$description`s to be tone-specific (dropping "regardless of the
tone" from the neutral ones, which was the shared-disabled rationale).
Update the `Button` (brand) and `AlertDialog` (error) disabled states to
reference the matching tone-specific disabled tokens instead of reaching
into the `neutral` namespace. Values are identical, so there is no visual
change.
`item-popup` is left on `neutral-disabled`: its disabled color applies to
the item text, which is neutral-toned in every state (only the highlight
background is brand-toned, and disabled items are never highlighted).
* ItemPopup: Use brand disabled background token for disabled items
The disabled item background is brand-toned (the highlight uses
`brand-weak-active`). Reference `background-interactive-brand-weak-disabled`
explicitly so the disabled state stays in sync if the token value ever
changes, even though it currently resolves to transparent. The item text
remains neutral-toned.
* Theme: Drop stroke error-strong-disabled token for neutral parity
The neutral stroke tone exposes only a normal-emphasis disabled token (no strong-emphasis disabled variant), so the error tone should match. Removes the unused strong-emphasis disabled stroke token and regenerates the prebuilt artifacts and docs.
* UI: Clarify changelog wording for disabled token adoption
The disabled list-item background in Select/Autocomplete/Combobox is a newly added declaration, not a swap of an existing neutral token.
* Theme: Share a transparent primitive across interactive tokens
Several interactive background tokens (the weak/normal and disabled variants for the neutral, brand, and error tones) repeated the same inline fully-transparent value. Extract it into a shared `primitive.transparent` token and reference it, mirroring how the other disabled tokens already alias primitives. Internal-only: primitives are not emitted as custom properties, so there is no public API or resolved-value change.
---
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>
Copy file name to clipboardExpand all lines: packages/theme/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
7
- Add `--wpds-border-radius-xl` for page and app shell surfaces so nested cards and notices can stay on `--wpds-border-radius-lg` without matching the parent radius ([#78913](https://github.com/WordPress/gutenberg/pull/78913)).
8
8
- Add `cornerRadius` prop to `ThemeProvider` for configuring the border-radius preset (`none`, `subtle`, `moderate`, `pronounced`) via prebuilt design token modes. [#78816](https://github.com/WordPress/gutenberg/pull/78816).
9
+
- Add disabled variants for the `brand` and `error` tones of the interactive `background`, `foreground`, and `stroke` color tokens (e.g. `--wpds-color-stroke-interactive-brand-disabled`, `--wpds-color-background-interactive-brand-strong-disabled`), for parity with the existing `neutral` disabled tokens ([#79124](https://github.com/WordPress/gutenberg/pull/79124)).
Copy file name to clipboardExpand all lines: packages/theme/docs/tokens.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,17 +161,22 @@ The interactive state of the element. The default (no modifier) is the idle stat
161
161
|`--wpds-color-background-interactive-neutral-strong-disabled`| Background color for interactive elements with neutral tone and strong emphasis, in their disabled state. |
162
162
|`--wpds-color-background-interactive-neutral-weak`| Background color for interactive elements with neutral tone and weak emphasis. |
163
163
|`--wpds-color-background-interactive-neutral-weak-active`| Background color for interactive elements with neutral tone and weak emphasis that are hovered, focused, or active. |
164
-
|`--wpds-color-background-interactive-neutral-weak-disabled`| Background color for interactive elements with weak emphasis, in their disabled state, regardless of the tone.|
164
+
|`--wpds-color-background-interactive-neutral-weak-disabled`| Background color for interactive elements with neutral tone and weak emphasis, in their disabled state. |
165
165
|`--wpds-color-background-interactive-brand-strong`| Background color for interactive elements with brand tone and strong emphasis. |
166
166
|`--wpds-color-background-interactive-brand-strong-active`| Background color for interactive elements with brand tone and strong emphasis that are hovered, focused, or active. |
167
+
|`--wpds-color-background-interactive-brand-strong-disabled`| Background color for interactive elements with brand tone and strong emphasis, in their disabled state. |
167
168
|`--wpds-color-background-interactive-brand-weak`| Background color for interactive elements with brand tone and weak emphasis. |
168
169
|`--wpds-color-background-interactive-brand-weak-active`| Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active. |
170
+
|`--wpds-color-background-interactive-brand-weak-disabled`| Background color for interactive elements with brand tone and weak emphasis, in their disabled state. |
169
171
|`--wpds-color-background-interactive-error`| Background color for interactive elements with error tone and normal emphasis. |
170
172
|`--wpds-color-background-interactive-error-active`| Background color for interactive elements with error tone and normal emphasis that are hovered, focused, or active. |
173
+
|`--wpds-color-background-interactive-error-disabled`| Background color for interactive elements with error tone and normal emphasis, in their disabled state. |
171
174
|`--wpds-color-background-interactive-error-strong`| Background color for interactive elements with error tone and strong emphasis. |
172
175
|`--wpds-color-background-interactive-error-strong-active`| Background color for interactive elements with error tone and strong emphasis that are hovered, focused, or active. |
176
+
|`--wpds-color-background-interactive-error-strong-disabled`| Background color for interactive elements with error tone and strong emphasis, in their disabled state. |
173
177
|`--wpds-color-background-interactive-error-weak`| Background color for interactive elements with error tone and weak emphasis. |
174
178
|`--wpds-color-background-interactive-error-weak-active`| Background color for interactive elements with error tone and weak emphasis that are hovered, focused, or active. |
179
+
|`--wpds-color-background-interactive-error-weak-disabled`| Background color for interactive elements with error tone and weak emphasis, in their disabled state. |
175
180
|`--wpds-color-background-track-neutral-weak`| Background color for tracks with a neutral tone and weak emphasis (eg. scrollbar track). |
176
181
|`--wpds-color-background-track-neutral`| Background color for tracks with a neutral tone and normal emphasis (eg. slider or progressbar track). |
177
182
|`--wpds-color-background-thumb-neutral-weak`| Background color for thumbs with a neutral tone and weak emphasis (eg. scrollbar thumb). |
@@ -193,20 +198,24 @@ The interactive state of the element. The default (no modifier) is the idle stat
193
198
|`--wpds-color-foreground-content-error-weak`| Foreground color for content like text with error tone and weak emphasis. |
194
199
|`--wpds-color-foreground-interactive-neutral`| Foreground color for interactive elements with neutral tone and normal emphasis. |
195
200
|`--wpds-color-foreground-interactive-neutral-active`| Foreground color for interactive elements with neutral tone and normal emphasis that are hovered, focused, or active. |
196
-
|`--wpds-color-foreground-interactive-neutral-disabled`| Foreground color for interactive elements with normal emphasis, in their disabled state, regardless of the tone.|
201
+
|`--wpds-color-foreground-interactive-neutral-disabled`| Foreground color for interactive elements with neutral tone and normal emphasis, in their disabled state. |
197
202
|`--wpds-color-foreground-interactive-neutral-strong`| Foreground color for interactive elements with neutral tone and strong emphasis. |
198
203
|`--wpds-color-foreground-interactive-neutral-strong-active`| Foreground color for interactive elements with neutral tone and strong emphasis that are hovered, focused, or active. |
199
-
|`--wpds-color-foreground-interactive-neutral-strong-disabled`| Foreground color for interactive elements with strong emphasis, in their disabled state, regardless of the tone.|
204
+
|`--wpds-color-foreground-interactive-neutral-strong-disabled`| Foreground color for interactive elements with neutral tone and strong emphasis, in their disabled state. |
200
205
|`--wpds-color-foreground-interactive-neutral-weak`| Foreground color for interactive elements with neutral tone and weak emphasis. |
201
-
|`--wpds-color-foreground-interactive-neutral-weak-disabled`| Foreground color for interactive elements with weak emphasis, in their disabled state, regardless of the tone.|
206
+
|`--wpds-color-foreground-interactive-neutral-weak-disabled`| Foreground color for interactive elements with neutral tone and weak emphasis, in their disabled state. |
202
207
|`--wpds-color-foreground-interactive-brand`| Foreground color for interactive elements with brand tone and normal emphasis. |
203
208
|`--wpds-color-foreground-interactive-brand-active`| Foreground color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active. |
209
+
|`--wpds-color-foreground-interactive-brand-disabled`| Foreground color for interactive elements with brand tone and normal emphasis, in their disabled state. |
204
210
|`--wpds-color-foreground-interactive-brand-strong`| Foreground color for interactive elements with brand tone and strong emphasis. |
205
211
|`--wpds-color-foreground-interactive-brand-strong-active`| Foreground color for interactive elements with brand tone and strong emphasis that are hovered, focused, or active. |
212
+
|`--wpds-color-foreground-interactive-brand-strong-disabled`| Foreground color for interactive elements with brand tone and strong emphasis, in their disabled state. |
206
213
|`--wpds-color-foreground-interactive-error`| Foreground color for interactive elements with error tone and normal emphasis. |
207
214
|`--wpds-color-foreground-interactive-error-active`| Foreground color for interactive elements with error tone and normal emphasis that are hovered, focused, or active. |
215
+
|`--wpds-color-foreground-interactive-error-disabled`| Foreground color for interactive elements with error tone and normal emphasis, in their disabled state. |
208
216
|`--wpds-color-foreground-interactive-error-strong`| Foreground color for interactive elements with error tone and strong emphasis. |
209
217
|`--wpds-color-foreground-interactive-error-strong-active`| Foreground color for interactive elements with error tone and strong emphasis that are hovered, focused, or active. |
218
+
|`--wpds-color-foreground-interactive-error-strong-disabled`| Foreground color for interactive elements with error tone and strong emphasis, in their disabled state. |
210
219
|`--wpds-color-stroke-surface-neutral`| Decorative stroke color used to define neutrally-toned surface boundaries with normal emphasis. |
211
220
|`--wpds-color-stroke-surface-neutral-weak`| Decorative stroke color used to define neutrally-toned surface boundaries with weak emphasis. |
212
221
|`--wpds-color-stroke-surface-neutral-strong`| Decorative stroke color used to define neutrally-toned surface boundaries with strong emphasis. |
@@ -222,12 +231,14 @@ The interactive state of the element. The default (no modifier) is the idle stat
222
231
|`--wpds-color-stroke-surface-error-strong`| Decorative stroke color used to define error-toned surface boundaries with strong emphasis. |
223
232
|`--wpds-color-stroke-interactive-neutral`| Accessible stroke color used for interactive neutrally-toned elements with normal emphasis. |
224
233
|`--wpds-color-stroke-interactive-neutral-active`| Accessible stroke color used for interactive neutrally-toned elements with normal emphasis that are hovered, focused, or active. |
225
-
|`--wpds-color-stroke-interactive-neutral-disabled`| Accessible stroke color used for interactive elements with normal emphasis, in their disabled state, regardless of the tone.|
234
+
|`--wpds-color-stroke-interactive-neutral-disabled`| Accessible stroke color used for interactive neutrally-toned elements with normal emphasis, in their disabled state. |
226
235
|`--wpds-color-stroke-interactive-neutral-strong`| Accessible stroke color used for interactive neutrally-toned elements with strong emphasis. |
227
236
|`--wpds-color-stroke-interactive-brand`| Accessible stroke color used for interactive brand-toned elements with normal emphasis. |
228
237
|`--wpds-color-stroke-interactive-brand-active`| Accessible stroke color used for interactive brand-toned elements with normal emphasis that are hovered, focused, or active. |
238
+
|`--wpds-color-stroke-interactive-brand-disabled`| Accessible stroke color used for interactive brand-toned elements with normal emphasis, in their disabled state. |
229
239
|`--wpds-color-stroke-interactive-error`| Accessible stroke color used for interactive error-toned elements with normal emphasis. |
230
240
|`--wpds-color-stroke-interactive-error-active`| Accessible stroke color used for interactive error-toned elements with normal emphasis that are hovered, focused, or active. |
241
+
|`--wpds-color-stroke-interactive-error-disabled`| Accessible stroke color used for interactive error-toned elements with normal emphasis, in their disabled state. |
231
242
|`--wpds-color-stroke-interactive-error-strong`| Accessible stroke color used for interactive error-toned elements with strong emphasis. |
232
243
|`--wpds-color-stroke-focus`| Accessible stroke color applied to focus rings. |
0 commit comments