Skip to content

Add xl border radius token for page shell surfaces.#78913

Merged
jameskoster merged 6 commits into
trunkfrom
add-wpds-border-radius-xl
Jun 12, 2026
Merged

Add xl border radius token for page shell surfaces.#78913
jameskoster merged 6 commits into
trunkfrom
add-wpds-border-radius-xl

Conversation

@jameskoster

Copy link
Copy Markdown
Contributor

What

Adds --wpds-border-radius-xl to the WPDS border radius scale and uses it on outer admin page shell surfaces.

Token & docs

  • New xl step in packages/theme/tokens/border.json and regenerated prebuild artifacts
  • Documented in packages/theme/docs/tokens.md and packages/theme/CHANGELOG.md

Consumers

  • Boot: boot-layout__stage, boot-layout__inspector, and boot-layout__canvas (desktop); view-transition pseudo-elements
  • Site editor: .edit-site-layout__area and .edit-site-layout:not(.is-full-canvas) .edit-site-layout__canvas .edit-site-resizable-frame__inner-content
  • Storybook: theme example application mock page chrome

Why

The WPDS design language calls for radius to scale with container size. However, page shells and contained surfaces (Card, Notice) share an 8px radius, so when the latter are nested within the former, the hierarchy is broken. See the Gutenberg Experiments page as an example.

Extending the scale upward (rather than shrinking cards/notices) keeps lg aligned with the existing guidance for cards and modals.

How

  1. Token: xssmmdlgxl via Terrazzo; run npm run build:tokens in @wordpress/theme.
  2. Shells: Replace hardcoded 8px / $radius-large on outer layout chrome with var(--wpds-border-radius-xl).
  3. Nested surfaces: No changes to @wordpress/ui Card/Notice (still lg).

Screenshots

Before After
Screenshot 2026-06-03 at 15 44 37 Screenshot 2026-06-03 at 15 43 18

Note the radius of the shell is now one step larger than the radius of the nested cards.

Test plan

  • Storybook → Design System/Theme/Theme Provider/Example Application — page chrome is more rounded than inner Card
  • Storybook or local app → boot routes with Card/Notice inside stage — parent radius visibly larger than card
  • Site editor (non–full-canvas) — preview frame and layout area use 12px corners; full-canvas mode unchanged
  • Confirm dashboard widget tiles still match Card lg (8px)
  • npm run build / theme token build if CI requires fresh prebuild

@jameskoster jameskoster requested a review from a team as a code owner June 3, 2026 14:45
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jameskoster <[email protected]>
Co-authored-by: aduth <[email protected]>
Co-authored-by: ciampo <[email protected]>
Co-authored-by: jasmussen <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions Bot added [Package] Edit Site /packages/edit-site [Package] Theme /packages/theme labels Jun 3, 2026
@jameskoster jameskoster added the [Type] Enhancement A suggestion for improvement. label Jun 3, 2026

@aduth aduth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Logic tracks, verified in Site Editor & Fonts page, and searched other instances of border-radius in boot, edit-site, and admin-ui.

Comment thread packages/theme/docs/tokens.md Outdated
@jameskoster jameskoster force-pushed the add-wpds-border-radius-xl branch from 5674a1f to 83d87d5 Compare June 8, 2026 11:30
@jameskoster jameskoster requested a review from a team June 8, 2026 11:30
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Size Change: +63 B (0%)

Total Size: 8.59 MB

📦 View Changed
Filename Size Change
build/modules/boot/index.min.js 52.7 kB +15 B (+0.03%)
build/styles/edit-site/style-rtl.css 22.1 kB +24 B (+0.11%)
build/styles/edit-site/style-rtl.min.css 18.2 kB +3 B (+0.02%)
build/styles/edit-site/style.css 22.1 kB +17 B (+0.08%)
build/styles/edit-site/style.min.css 18.2 kB +4 B (+0.02%)

compressed-size-action

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Flaky tests detected in c293deb.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27413277646
📝 Reported issues:

@jasmussen

Copy link
Copy Markdown
Contributor

Not blocking this. But a brief moment of pause and reflection—the math checks out, but I think it's worth asking whether the page should be so rounded after all.

Consider that we are looking to potentially replace the default 2px corner radius for buttons and inputs with 4px, which whould shift the entire range. Presumably we'd be looking at a 16px outer corner radius for the page itself. Does that get too bubbly?

I suspect the answer is: no, it's fine. But is there a way we can quickly gut-check this with a sketched visual before we land this?

@jameskoster

Copy link
Copy Markdown
Contributor Author

I don't think the value of a token in the default scale needs to prescribe the value in a different scale.

In other words, if the xl token in the default scale is 12px, that doesn't necessarily mean it needs to be 16px in the next scale up. The default progression might be 2 → 4 → 8 → 12; the next could be 4 → 6 → 10 → 14, or even 3 → 5 → 9 → 13. We can choose. As the lower end of the scale gets more rounded we could even taper the upper-end to reduce bubblyness, e.g. 6 → 9 → 12 → 15.

If we agree the new xl token is warranted then what I'd like to do is merge this PR then refine the per-scale values in #78913 (which includes a story to easily test these details).

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this is good to go after remaining feedback is addressed + a rebase.

Merging will depend on design feedback

Comment thread packages/theme/CHANGELOG.md Outdated
@jameskoster jameskoster force-pushed the add-wpds-border-radius-xl branch from 83d87d5 to 2d74d6a Compare June 9, 2026 14:56
@jameskoster

Copy link
Copy Markdown
Contributor Author

I see a 👍 from @jasmussen, but will wait for a green check before merging.

### New Features

- Add `--wpds-dimension-size-*` design tokens for element sizing ([#76545](https://github.com/WordPress/gutenberg/pull/76545)).
- 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)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to rebase, move CHANGELOG to latest unreleased section before merging

jameskoster and others added 6 commits June 12, 2026 12:35
Extend the WPDS radius scale with --wpds-border-radius-xl (12px) so outer
admin shells can use a larger corner radius than nested cards and notices
on lg. Apply the token in boot layout, site editor layout, and the theme
example story.

Co-authored-by: Cursor <[email protected]>
Replace generic size labels with guidance on which UI surfaces each step is intended for.

Co-authored-by: Cursor <[email protected]>
@jameskoster jameskoster force-pushed the add-wpds-border-radius-xl branch from 2d74d6a to c293deb Compare June 12, 2026 11:38
@jameskoster

Copy link
Copy Markdown
Contributor Author

I'm going to merge this as it closes a gap in the tokens exposed by a genuine need in the design language. We can continue to iterate as needed :)

@jameskoster jameskoster merged commit 8be2bc3 into trunk Jun 12, 2026
44 checks passed
@jameskoster jameskoster deleted the add-wpds-border-radius-xl branch June 12, 2026 12:34
@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Edit Site /packages/edit-site [Package] Theme /packages/theme [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants