-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Expand error family of tokens #73793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
|
Size Change: +589 B (+0.02%) Total Size: 2.58 MB
ℹ️ View Unchanged
|
aduth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to visualize without real-world usage, but we can tinker as we go 😄
| | `--wpds-color-stroke-interactive-brand-active` | Accessible stroke color used for interactive brand-toned elements with normal emphasis that are hovered, focused, or active. | | ||
| | `--wpds-color-stroke-interactive-brand-disabled` | Accessible stroke color used for interactive brand-toned elements with normal emphasis, in their disabled state. | | ||
| | `--wpds-color-stroke-interactive-error` | Accessible stroke color used for interactive error-toned elements with normal emphasis. | | ||
| | `--wpds-color-stroke-interactive-error-active` | Accessible stroke color used for interactive error-toned elements with normal emphasis that are hovered, focused, or active. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, we don't need a disabled token here? And if not, how come we need one for brand ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With one eye on adding 'neutral' toned button I think we'll want all disabled buttons to have the same visual style; light gray background and gray text, no stroke, regardless of variant. This will ensure a disabled brand outline button doesn't look too similar to a neutral secondary button. So we won't need the disabled stroke token.
And if not, how come we need one for brand ?
Good question. I can't think of a use case for that off the top of my head. Do you think we should remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if not, how come we need one for brand ?
Good question. I can't think of a use case for that off the top of my head. Do you think we should remove it?
Yeah, I had a hunch about your answer, and I think it makes sense as a logical action item for consistency if we don't think we'll need these disabled states.
|
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. |

What
Expands the error family of design tokens by adding interactive color tokens for error-toned elements. Adds:
bg-interactive-error(normal, strong, weak) with resting, active, and disabled statesfg-interactive-error(normal, strong) with resting, active, and disabled statesstroke-interactive-error(normal) with resting and active statesUpdates generated outputs (CSS, JS, JSON, TypeScript) and documentation to include these tokens.
Why
These changes will enable the creation of destructive button variants.
How
packages/theme/tokens/color.json:design-tokens.cssdesign-tokens.jsfigma.jsoncolor-tokens.tsds-tokens.mdto include the new tokens in the reference table.