Admin Reskin: Buttons and Form Fields#10783
Admin Reskin: Buttons and Form Fields#10783fabiankaegy wants to merge 42 commits intoWordPress:trunkfrom
Conversation
Introduces _tokens.scss with Sass variables derived from the WordPress Design System in Figma. These tokens provide consistent values for: - Spacing (4px grid units) - Border radius - Gray scale - Semantic colors (alerts/notices) - Typography scale - Elevation (box shadows) - Component sizing (buttons, inputs, checkboxes) The tokens are imported into _variables.scss and can be used across all admin stylesheets compiled via Sass. Note: These are Sass-only variables. No new CSS custom properties are exposed to maintain backward compatibility. The only CSS custom properties available remain those from wp-base-styles. Part of the WordPress 7.0 admin visual reskin initiative. See: https://core.trac.wordpress.org/ticket/64308
Update all button styles to match Gutenberg's component patterns and the WordPress Design System specifications. **Sizing (aligned with Gutenberg's next-default-40px):** - Default buttons: 40px height (was 30px) - Compact buttons: 32px (new class for space-constrained contexts) - Small buttons: 24px (was 26px) - Hero buttons: 48px (was 46px) - Use min-height + line-height for accessibility with browser zoom **Visual updates:** - Border radius: 2px (was 3px) - Font weight: 500 (was 400/normal) - Transparent background for secondary/tertiary buttons **Focus states (Gutenberg-style outer ring):** - Primary: outer theme color ring + inner white ring for contrast - Secondary/Tertiary/Link: single outer theme color ring - Use var(--wp-admin-theme-color) for focus ring color **Hover/Active states:** - Secondary buttons: subtle rgba() background tint on hover/active - Use theme-color-darker-20 for hover text/border colors - Link buttons: theme-color-darker-20 on hover **Components updated:** - .button, .button-primary, .button-secondary - .button-link, .button-link-delete - .page-title-action (now uses secondary button pattern) See: https://core.trac.wordpress.org/ticket/64308
Update theme card buttons to work with the new design system sizing. **Button sizing:** - Use compact size (32px) for theme card buttons since they're in a space-constrained context - Set explicit min-height, line-height, and padding to match compact spec **Button visibility:** - Add white background to secondary buttons for visibility against the semi-transparent theme card overlay - Use :not(.button-primary) selector to preserve primary button styling - Adjust hover state to use #f0f0f0 background **Layout adjustments:** - Increase theme name vertical padding from 15px to 16px to accommodate taller buttons - Adjust active theme padding-right from 110px to 115px for button width - Reduce theme-actions horizontal padding from 15px to 12px See: https://core.trac.wordpress.org/ticket/64308
Update all form control styles to match Gutenberg's component patterns and the WordPress Design System specifications. **Text Inputs:** - Default height: 40px (was 30px) - Border radius: 2px (was 4px) - Border color: #949494 (was #8c8f94) - Text color: #1e1e1e (was #2c3338) - Padding: 0 12px (was 0 8px) - Focus: Gutenberg-style 0.5px outer ring with theme color **Select Dropdowns:** - Height: 40px (was 30px) - Border radius: 2px (was 3px) - Border color: #949494 (was #8c8f94) - Arrow icon: updated to #1e1e1e - Focus: Gutenberg-style 0.5px outer ring **Textarea:** - Padding: 8px 12px (was 2px 6px) **Checkbox/Radio:** - Border: 1px #1e1e1e (was #8c8f94) - Border radius: 2px (checkbox), unchanged (radio) - Focus: outset ring (2px white + 4px theme color) - Checked: theme color background + border, white checkmark/dot **Disabled/Readonly States:** - Disabled: #f0f0f0 background, #cccccc border, #949494 text - Readonly: #f0f0f0 background **Password Fields:** - Height: 40px (was 30px) - Toggle button focus: 2px border-radius - Strength meter: 2px border-radius, updated colors **Other Updates:** - Placeholder: #757575 (was #646970) - Autocomplete focus: uses theme color - All focus states use var(--wp-admin-theme-color) See: https://core.trac.wordpress.org/ticket/64308
Introduces _tokens.scss with Sass variables derived from the WordPress Design System in Figma. These tokens provide consistent values for: - Spacing (4px grid units) - Border radius - Gray scale - Semantic colors (alerts/notices) - Typography scale - Elevation (box shadows) - Component sizing (buttons, inputs, checkboxes) The tokens are imported into _variables.scss and can be used across all admin stylesheets compiled via Sass. Note: These are Sass-only variables. No new CSS custom properties are exposed to maintain backward compatibility. The only CSS custom properties available remain those from wp-base-styles. Part of the WordPress 7.0 admin visual reskin initiative. See: https://core.trac.wordpress.org/ticket/64308
Update all button styles to match Gutenberg's component patterns and the WordPress Design System specifications. **Sizing (aligned with Gutenberg's next-default-40px):** - Default buttons: 40px height (was 30px) - Compact buttons: 32px (new class for space-constrained contexts) - Small buttons: 24px (was 26px) - Hero buttons: 48px (was 46px) - Use min-height + line-height for accessibility with browser zoom **Visual updates:** - Border radius: 2px (was 3px) - Font weight: 500 (was 400/normal) - Transparent background for secondary/tertiary buttons **Focus states (Gutenberg-style outer ring):** - Primary: outer theme color ring + inner white ring for contrast - Secondary/Tertiary/Link: single outer theme color ring - Use var(--wp-admin-theme-color) for focus ring color **Hover/Active states:** - Secondary buttons: subtle rgba() background tint on hover/active - Use theme-color-darker-20 for hover text/border colors - Link buttons: theme-color-darker-20 on hover **Components updated:** - .button, .button-primary, .button-secondary - .button-link, .button-link-delete - .page-title-action (now uses secondary button pattern) See: https://core.trac.wordpress.org/ticket/64308
Update theme card buttons to work with the new design system sizing. **Button sizing:** - Use compact size (32px) for theme card buttons since they're in a space-constrained context - Set explicit min-height, line-height, and padding to match compact spec **Button visibility:** - Add white background to secondary buttons for visibility against the semi-transparent theme card overlay - Use :not(.button-primary) selector to preserve primary button styling - Adjust hover state to use #f0f0f0 background **Layout adjustments:** - Increase theme name vertical padding from 15px to 16px to accommodate taller buttons - Adjust active theme padding-right from 110px to 115px for button width - Reduce theme-actions horizontal padding from 15px to 12px See: https://core.trac.wordpress.org/ticket/64308
Introduces _tokens.scss with Sass variables derived from the WordPress Design System in Figma. These tokens provide consistent values for: - Spacing (4px grid units) - Border radius - Gray scale - Semantic colors (alerts/notices) - Typography scale - Elevation (box shadows) - Component sizing (buttons, inputs, checkboxes) The tokens are imported into _variables.scss and can be used across all admin stylesheets compiled via Sass. Note: These are Sass-only variables. No new CSS custom properties are exposed to maintain backward compatibility. The only CSS custom properties available remain those from wp-base-styles. Part of the WordPress 7.0 admin visual reskin initiative. See: https://core.trac.wordpress.org/ticket/64308
Update all button styles to match Gutenberg's component patterns and the WordPress Design System specifications. **Sizing (aligned with Gutenberg's next-default-40px):** - Default buttons: 40px height (was 30px) - Compact buttons: 32px (new class for space-constrained contexts) - Small buttons: 24px (was 26px) - Hero buttons: 48px (was 46px) - Use min-height + line-height for accessibility with browser zoom **Visual updates:** - Border radius: 2px (was 3px) - Font weight: 500 (was 400/normal) - Transparent background for secondary/tertiary buttons **Focus states (Gutenberg-style outer ring):** - Primary: outer theme color ring + inner white ring for contrast - Secondary/Tertiary/Link: single outer theme color ring - Use var(--wp-admin-theme-color) for focus ring color **Hover/Active states:** - Secondary buttons: subtle rgba() background tint on hover/active - Use theme-color-darker-20 for hover text/border colors - Link buttons: theme-color-darker-20 on hover **Components updated:** - .button, .button-primary, .button-secondary - .button-link, .button-link-delete - .page-title-action (now uses secondary button pattern) See: https://core.trac.wordpress.org/ticket/64308
Update theme card buttons to work with the new design system sizing. **Button sizing:** - Use compact size (32px) for theme card buttons since they're in a space-constrained context - Set explicit min-height, line-height, and padding to match compact spec **Button visibility:** - Add white background to secondary buttons for visibility against the semi-transparent theme card overlay - Use :not(.button-primary) selector to preserve primary button styling - Adjust hover state to use #f0f0f0 background **Layout adjustments:** - Increase theme name vertical padding from 15px to 16px to accommodate taller buttons - Adjust active theme padding-right from 110px to 115px for button width - Reduce theme-actions horizontal padding from 15px to 12px See: https://core.trac.wordpress.org/ticket/64308
…ss-develop into admin-reskin/buttons
# Conflicts: # src/wp-admin/css/colors/_admin.scss # src/wp-admin/css/forms.css
Adds line-height rules to buttons.css to vertically center dashicons inside all button variants (default, compact, small, hero). This provides a consistent solution instead of scattered individual fixes. Removes redundant dashicon centering fixes from dashboard.css and themes.css that are now handled by the global rules.
Corrects the line-height values for dashicons inside buttons. The previous calculation incorrectly used the button's font-size (13px) as the base, but dashicons have their own font-size of 20px. Correct values: line-height = target-height / 20px - Default (38px): 1.9 - Compact (30px): 1.5 - Small (22px): 1.1 - Hero (46px): 2.3
Updates the icon positioning for button states (updating-message, installed, installing, etc.) to use line-height instead of margin-top hacks. This ensures icons are vertically centered in 40px buttons.
Updates tablenav container and pagination buttons to match 40px button height: - tablenav height: 30px → 40px - Pagination buttons: min-width/height 30px → 40px, line-height adjusted Fixes plugin card update icon centering using line-height instead of margin-top hack.
Sets explicit compact button sizing (32px) for the Screen Options and Help toggle buttons in the admin header. These buttons should remain smaller than the default 40px buttons used elsewhere.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
Hi @fabiankaegy, Media Library vertical misalignment
Settings vertical misalignement on lists
Then I tested a few popular plugins, like Classic Editor, CF7, Redirection, SCF, and others. Globally settings pages are OK, I only found a few glitches, like: Alignement bug on Visual/Code tabs on Classic Editor
Alignement bug on Redirection filters
More tests on popular plugins are welcome. |
|
From Jb's screenshots above, one note I'd add is that you can use either the 32px or 40px height for most of the controls, e.g. try the "compact" view here. 32px may be a better fit for many of these. |
|
Thanks @jasmussen :) You can view the full thing live here: https://playground.wordpress.net/wordpress.html?pr=10783 |
|
Thanks @audrasjb @jasmussen @joedolson :) I've taken all your great feedback and made modifications based on it 👍 |
|
@fabiankaegy I am seeing some inconsistencies regarding the secondary button style here.
Same with the link's color here.
Thanks! |
2. Question: when we apply a new admin color scheme, should we see these changes too? @joedolson @fabiankaegy @karmatosed @audrasjb ?
I've installed Twenty Nineteen theme for the next items:
3. Customizer > Site Identity: the buttons are a bit large.
4. Customizer, Menus > all add links options are badly aligned:
5. Customizer > Homepage Settings also a button that's too small.
|
There was a problem hiding this comment.
Pull request overview
Updates WordPress admin UI styles to match the “Admin Reskin” direction, primarily by adjusting button/input sizing, padding, colors, and introducing a Sass token source for consistent design values.
Changes:
- Resizes and restyles core admin buttons/inputs (40px default, 32px compact) and updates focus/disabled/active states.
- Adjusts layout/spacing in several admin screens (Media modal/toolbars, Themes cards/overlays, list tables, Customizer, nav menus).
- Adds a new Sass token module and updates color-scheme Sass mixins/admin rules to reference design tokens and (new) CSS custom properties.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wp-includes/css/media-views.css | Updates Media modal input sizing, borders/colors, toolbar control sizing, and focus/disabled styles. |
| src/wp-includes/css/editor.css | Tweaks editor tab/button spacing. |
| src/wp-includes/css/buttons.css | Redefines button sizing (default 40px), adds compact size, updates states/colors, and dashicon alignment. |
| src/wp-admin/css/themes.css | Adjusts theme browser card actions button sizing and overlay/header spacing. |
| src/wp-admin/css/nav-menus.css | Changes button controls layout to flex for improved alignment. |
| src/wp-admin/css/media.css | Applies compact sizing to Media grid toolbar controls and edit-attachment buttons. |
| src/wp-admin/css/login.css | Adjusts login “hide password” dashicon positioning. |
| src/wp-admin/css/list-tables.css | Updates list-table nav/button sizing and dashicon vertical alignment. |
| src/wp-admin/css/forms.css | Updates global admin form field sizing, borders/colors, focus rings, and checkbox/radio styling. |
| src/wp-admin/css/dashboard.css | Updates dashboard textarea padding and removes a dashicon rule. |
| src/wp-admin/css/customize-nav-menus.css | Updates Customizer menu items search layout offsets and adds flex layout for control buttons. |
| src/wp-admin/css/customize-controls.css | Centers/realigns Customizer header actions and adjusts search field sizing/offsets. |
| src/wp-admin/css/common.css | Reskins page title action button sizing/layout and adjusts several toolbar/action layouts. |
| src/wp-admin/css/colors/_variables.scss | Imports tokens and switches body background to token-based gray. |
| src/wp-admin/css/colors/_tokens.scss | Introduces a centralized design token set (spacing/radius/colors/typography/etc). |
| src/wp-admin/css/colors/_mixins.scss | Reworks button mixins toward theme-color CSS custom properties and token-based radii/colors. |
| src/wp-admin/css/colors/_admin.scss | Updates scheme-driven admin styles for buttons/forms to use tokens and theme-color CSS custom properties. |
Comments suppressed due to low confidence (1)
src/wp-admin/css/common.css:672
.page-title-actionis being restyled for the reskin, but it still hard-codes the legacy blue palette (#2271b1,#0a4b78,#3582c4) while buttons.css now uses#3858e9/new focus styling. This will make the “Add New” button visually inconsistent. Update these colors/focus styles to match the new button tokens (ideally using the same theme color variables/focus-ring width).
border: 1px solid #2271b1;
border-radius: 2px;
background: transparent;
font-size: 13px;
font-weight: 500;
min-height: 32px;
line-height: 2.30769231; /* 30px for 32px height */
color: #2271b1; /* use the standard color used for buttons */
padding: 0 12px;
-webkit-appearance: none;
}
.wrap .wp-heading-inline + .page-title-action {
margin-left: 0;
}
.wrap .add-new-h2:hover, /* deprecated */
.wrap .page-title-action:hover {
border-color: #0a4b78;
color: #0a4b78;
}
/* lower specificity: color needs to be overridden by :hover and :active */
.page-title-action:focus {
color: #0a4b78;
}
/* Dashicon for language options on General Settings and Profile screens */
.form-table th label[for="locale"] .dashicons,
.form-table th label[for="WPLANG"] .dashicons {
margin-left: 5px;
}
.wrap .page-title-action:focus {
border-color: #3582c4;
box-shadow: 0 0 0 1px #3582c4;
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| input[type=checkbox]:checked::before { | ||
| content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E"); | ||
| content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-colour(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E") / ''; | ||
| } | ||
|
|
||
| input[type=radio]:checked::before { | ||
| background: variables.$form-checked; | ||
| // Checkbox checkmark - white for visibility on theme color background | ||
| input[type="checkbox"]:checked::before { | ||
| content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E") / ''; | ||
| } |
There was a problem hiding this comment.
There are two input[type=checkbox]:checked::before rules back-to-back; the later one overrides the earlier variables.$form-checked version. This is dead code and makes it unclear which checkmark is intended. Remove the earlier rule (or consolidate into one) to avoid confusion and accidental reordering issues.
|
@phpbits @BluePraise thanks you two :) That was an oversight on my end. It now properly respects the admin scheme 👍 |
|
@fabiankaegy There seems to be an issue when I switch color schemes in Users. When I go from "Default" to any other color scheme and then back to "Default", I don't see the new reskin colors. When researching the issue, I noticed in I have looked in the Trac and could find no related issue to this since this may be unrelated to the reskin. However, it does impact the work of the reskin. To recreate:
I have pulled your latest work. |
|
@BluePraise I'm not sure I understand the issue you describe. The new color should only apply when the modern theme is applied. #10782 is responsible for changing the new default color scheme to be the modern one. I had a mistake in the code earlier today where the modern color applied in all color schemes which is now fixed 👍 |
joedolson
left a comment
There was a problem hiding this comment.
I did find another possible issue, noted in comment, but I think the best choice is actually to commit this and get all of the design PRs merged, so we can start examining the admin with everything in place. While splitting this into discrete parts was helpful for dev and reducing the scope of review, it's now hitting a point where we need to address it holistically.



















Trac ticket: https://core.trac.wordpress.org/ticket/64547
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.