Skip to content

Administration: Align border-radius values with design system tokens#12139

Open
Dervish12 wants to merge 1 commit into
WordPress:trunkfrom
Dervish12:trac/border-radius-design-tokens
Open

Administration: Align border-radius values with design system tokens#12139
Dervish12 wants to merge 1 commit into
WordPress:trunkfrom
Dervish12:trac/border-radius-design-tokens

Conversation

@Dervish12

Copy link
Copy Markdown

Summary

Replace non-standard border-radius values across 7 admin CSS files with their nearest equivalents from the WordPress design system defined in _tokens.scss.

Trac ticket: https://core.trac.wordpress.org/ticket/65444

Problem

The WordPress design system (_tokens.scss) defines a clear border-radius scale: 1px, 2px, 4px, 8px, 12px, 9999px. However, several admin CSS files still use legacy values (3px, 5px, 9px, 10px, 11px) that fall outside this scale, creating visual inconsistency.

Changes

Old value New value Design token Locations Elements
3px 2px radius-s 10 Buttons, save controls, theme cards, menu items
5px 4px radius-m 3 Comment count badges, bookmarklet button
9px 8px radius-l 1 Admin menu notification badges
10px 8px radius-l 1 Site icon previews
11px 12px radius-30 1 Pending comment count badge

Files changed

  • src/wp-admin/css/themes.css — 5 replacements
  • src/wp-admin/css/list-tables.css — 4 replacements
  • src/wp-admin/css/customize-controls.css — 3 replacements
  • src/wp-admin/css/admin-menu.css — 1 replacement
  • src/wp-admin/css/forms.css — 1 replacement
  • src/wp-admin/css/nav-menus.css — 1 replacement
  • src/wp-admin/css/site-icon.css — 1 replacement

Test plan

  • npm run build:dev — builds successfully
  • Verify theme browser cards, customizer save button, admin menu badges, comment count badges all render correctly
  • Compare against trunk — differences should be 1px or less, barely perceptible

This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Replace non-standard border-radius values with their nearest design
system equivalents as defined in _tokens.scss.

The WordPress design system defines these border-radius tokens:
  - 1px (radius-xs)
  - 2px (radius-s) — buttons, inputs
  - 4px (radius-m) — focus rings
  - 8px (radius-l) — cards, dashboard widgets
  - 12px (radius-30)
  - 9999px (radius-full) — pills, avatars

This changeset replaces values that fall outside this scale:
  - 3px → 2px (radius-s) in 10 locations across 4 files
  - 5px → 4px (radius-m) in 3 locations across 2 files
  - 9px → 8px (radius-l) in admin-menu.css notification badges
  - 10px → 8px (radius-l) in site-icon.css previews
  - 11px → 12px (radius-30) in list-tables.css comment badges

7 files changed, 16 replacements total.

Props dervishov.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 9, 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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props dervishov.

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 commented Jun 9, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant