Skip to content

Admin Reskin: Buttons and Form Fields#10783

Closed
fabiankaegy wants to merge 42 commits intoWordPress:trunkfrom
fabiankaegy:admin-reskin/buttons-and-form-fields
Closed

Admin Reskin: Buttons and Form Fields#10783
fabiankaegy wants to merge 42 commits intoWordPress:trunkfrom
fabiankaegy:admin-reskin/buttons-and-form-fields

Conversation

@fabiankaegy
Copy link
Member

@fabiankaegy fabiankaegy commented Jan 23, 2026

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.

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
# 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.
@fabiankaegy fabiankaegy requested a review from joedolson January 23, 2026 11:25
@github-actions
Copy link

github-actions bot commented Jan 23, 2026

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 fabiankaegy, joedolson, audrasjb, joen, phpbits, magaliechetrit.

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

@github-actions
Copy link

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

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • 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.

@audrasjb
Copy link
Contributor

Hi @fabiankaegy,
This looks globally good to me.
I tested this PR on a fresh install, and I went into each individual admin screen, on both desktop and small screen views.
This looks almost good to me, I only found a few glitches:

Media Library vertical misalignment

Capture d’écran 2026-01-28 à 08 15 11

Settings vertical misalignement on lists

Capture d’écran 2026-01-28 à 08 18 57

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

Capture d’écran 2026-01-28 à 08 27 13

Alignement bug on Redirection filters

Capture d’écran 2026-01-28 à 08 24 34

More tests on popular plugins are welcome.
For example: back in the years, here is the list of plugins I tested when we shipped the Admin Accessible Redesign in WordPress 5.3: https://make.wordpress.org/core/2019/10/15/report-wp-5-3-admin-css-changes-tested-against-top-20-plugins/

@jasmussen
Copy link

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.

@fabiankaegy
Copy link
Member Author

Thanks @jasmussen :) You can view the full thing live here: https://playground.wordpress.net/wordpress.html?pr=10783

@jasmussen
Copy link

Oh yeah, nice one. These come to mind as benefitting from 32px compact sizes:

Screenshot 2026-01-28 at 11 40 33 Screenshot 2026-01-28 at 11 40 37 Screenshot 2026-01-28 at 11 40 40 Screenshot 2026-01-28 at 11 40 52

@fabiankaegy
Copy link
Member Author

Thanks @audrasjb @jasmussen @joedolson :) I've taken all your great feedback and made modifications based on it 👍

@phpbits
Copy link

phpbits commented Feb 11, 2026

@fabiankaegy I am seeing some inconsistencies regarding the secondary button style here.

Screenshot 2026-02-12 at 2 07 11 AM Screenshot 2026-02-12 at 12 21 33 AM Screenshot 2026-02-12 at 12 21 24 AM

Same with the link's color here.

Screenshot 2026-02-12 at 2 12 21 AM Screenshot 2026-02-12 at 2 11 18 AM

Thanks!

@BluePraise
Copy link

  1. In Users view, the "Change" button is too big.
CleanShot 2026-02-11 at 13 20 30@2x 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. CleanShot 2026-02-11 at 13 27 13@2x 4. Customizer, Menus > all add links options are badly aligned: CleanShot 2026-02-11 at 13 28 23@2x CleanShot 2026-02-11 at 13 29 43@2x 5. Customizer > Homepage Settings also a button that's too small. CleanShot 2026-02-11 at 13 31 17@2x

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-action is 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.

Comment on lines 91 to +99
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") / '';
}
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@fabiankaegy
Copy link
Member Author

@phpbits @BluePraise thanks you two :) That was an oversight on my end. It now properly respects the admin scheme 👍

@BluePraise
Copy link

@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 src/js/_enqueues/admin/user-profile.js around line 543-550 that it would be reset to "nothing". There is no stylesheet recreated.

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:

  1. Navigate to Users > Profile
  2. Switch color schemes to any color schemes
  3. Go back to default color schemes.

I have pulled your latest work.

@fabiankaegy
Copy link
Member Author

@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
Copy link
Contributor

The :focus state on button-link doesn't match the link focus state. See example in the row actions, where 'Quick Edit' is a button-link, but the other controls are links:

Row actions showing focused Quick Edit

This could have effects throughout the admin, but it may also be resolved in another one of the design PRs, since this one is only addressing buttons/forms. I'm not totally sure. We're at a stage where it's pretty difficult to take all of the design refresh PRs into consideration in combination.

Copy link
Contributor

@joedolson joedolson left a comment

Choose a reason for hiding this comment

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

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.

@github-actions
Copy link

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 61645
GitHub commit: 7c9a0d6

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

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.

6 participants