Snackbar: Use surface-width design token for max-width#76592
Snackbar: Use surface-width design token for max-width#76592jameskoster wants to merge 2 commits intotrunkfrom
Conversation
Made-with: Cursor
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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. |
Made-with: Cursor
ciampo
left a comment
There was a problem hiding this comment.
Nothing to note code-wise, this is more of a design choice. Happy to defer to designers and keep an eye out of the conversation
|
Size Change: -79 B (0%) Total Size: 8.75 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 81d136f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23203541368
|
What
Follow-up to #76494. Use a
--wpds-dimension-surface-width-*design token for Snackbarmax-width.Why
As part of the ongoing adoption of surface-width design tokens from
@wordpress/theme, the Snackbar's hardcodedmax-width: 600pxcan be replaced with a token from the scale. This brings the Snackbar in line with other components (Dialog, Modal) that have already adopted these tokens.How
Replaced
max-width: 600pxwithvar(--wpds-dimension-surface-width-lg)(560px) inpackages/components/src/snackbar/style.scss.Note
The previous value of 600px sits between
lg(560px) andxl(720px) on the token scale, so there isn't an exact match. This PR useslgto keep the Snackbar compact, but I'm open to feedback if there's a feeling thatxl(720px) would be more appropriate.