Make WordPress Core

Changeset 62942


Ignore:
Timestamp:
07/30/2026 01:57:41 PM (10 days ago)
Author:
afercia
Message:

Administration: Improve consistency of the focus style across the admin.

After the admin reskin in WordPress 7.0, the focus style for various elements in the admin was slightly inconsistent especially regarding the overall border plus box-shadow thickness.
This change aims to fix most of the cases found and it's a consistency improvement over what it's in WordPress 7.0.

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

Props iamchitti, afercia.
Fixes #65645.

Location:
trunk/src
Files:
4 edited

Legend:

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

    r62673 r62942  
    13911391
    13921392div.tabs-panel-active:focus {
     1393        border-color: var(--wp-admin-theme-color);
    13931394        box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
    13941395        /* Only visible in Windows High Contrast mode */
  • trunk/src/wp-admin/css/forms.css

    r62838 r62942  
    659659        border-color: var(--wp-admin-theme-color);
    660660        border-radius: 2px;
    661         box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
     661        box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color);
    662662        /* Only visible in Windows High Contrast mode */
    663663        outline: 2px solid transparent;
     
    737737#pass1:focus,
    738738#pass1-text:focus {
    739         box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color);
     739        box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color);
     740        border-color: var(--wp-admin-theme-color, #3858e9);
    740741        /* Only visible in Windows High Contrast mode */
    741742        outline: 2px solid transparent;
  • trunk/src/wp-admin/css/list-tables.css

    r62838 r62942  
    770770        line-height: 1.84615384;
    771771        text-decoration: none;
     772        /* This border is needed for the focus style, which will change the border color. */
     773        border: 1px solid transparent;
    772774}
    773775
     
    779781        -webkit-font-smoothing: antialiased;
    780782        -moz-osx-font-smoothing: grayscale;
     783}
     784
     785.view-switch a:focus {
     786        /* This focus style already inherits box-shadow and outline from the regular links focus style. */
     787        border-color: var(--wp-admin-theme-color, #3858e9);
    781788}
    782789
  • trunk/src/wp-includes/css/media-views.css

    r62940 r62942  
    137137.media-frame select:focus {
    138138        border-color: var(--wp-admin-theme-color, #3858e9);
    139         /* Expand border by 0.5px for total 1.5px effect */
    140         box-shadow: 0 0 0 0.5px var(--wp-admin-theme-color, #3858e9);
     139        box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9);
    141140        outline: 2px solid transparent;
    142141}
Note: See TracChangeset for help on using the changeset viewer.