Make WordPress Core

Changeset 62875


Ignore:
Timestamp:
07/28/2026 05:52:21 PM (2 months ago)
Author:
joedolson
Message:

Administration: Fix focus/hover styles on collapse menu button.

The new :focus and :hover styles for the admin menu were only applied to links, and not extended to the collapse menu trigger, which is a button. Additionally, the entire hover/focus state change was missing in some alternate admin color schemes.

Add shape-based focus and hover states to collapse menu button to match the rest of the admin menu and add expected color changes across all admin schemes.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/12722

Props afercia, iamchitti, dhruvang21, fushar, habiburdev, joedolson.
Fixes #65726.

Location:
trunk/src/wp-admin/css
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/admin-menu.css

    r62568 r62875  
    471471}
    472472
    473 #collapse-button:hover {
    474         color: #72aee6;
    475 }
    476 
     473#collapse-button:hover,
    477474#collapse-button:focus {
    478475        color: #72aee6;
     476        box-shadow: inset 4px 0 0 0 currentColor;
     477        transition: box-shadow .1s linear;
     478}
     479
     480#collapse-button:focus {
    479481        /* Only visible in Windows High Contrast mode */
    480482        outline: 1px solid transparent;
  • trunk/src/wp-admin/css/colors/_admin.scss

    r62317 r62875  
    376376
    377377#collapse-button {
    378     color: variables.$menu-collapse-text;
     378        color: variables.$menu-collapse-text;
    379379}
    380380
    381381#collapse-button:hover,
    382382#collapse-button:focus {
    383     color: variables.$menu-submenu-focus-text;
     383        color: variables.$menu-highlight-text;
     384        background: variables.$menu-highlight-background;
    384385}
    385386
Note: See TracChangeset for help on using the changeset viewer.