Make WordPress Core


Ignore:
Timestamp:
03/18/2021 09:42:12 PM (4 years ago)
Author:
ryelle
Message:

Administration: Make focus states consistent in admin menu when collapsed.

When collapsed or on a small screen, these styles would override the color schemes, causing a dark background to appear regardless of the color scheme's settings. This change also uses focus-within to show or hide the menu item's arrow, consistent with how the arrow behaves on hover.

Props afercia, Bueltge.
Fixes #32579.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/colors/_admin.scss

    r50386 r50549  
    287287#adminmenu .wp-has-current-submenu .wp-submenu,
    288288#adminmenu .wp-has-current-submenu.opensub .wp-submenu,
    289 .folded #adminmenu .wp-has-current-submenu .wp-submenu,
    290289#adminmenu a.wp-has-current-submenu:focus + .wp-submenu {
    291290    background: $menu-submenu-background;
    292291}
    293292
    294 #adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after {
     293#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after,
     294#adminmenu li.wp-has-submenu.wp-not-current-submenu:focus-within:after {
    295295    border-right-color: $menu-submenu-background;
    296296}
     
    302302#adminmenu .wp-submenu a,
    303303#adminmenu .wp-has-current-submenu .wp-submenu a,
    304 .folded #adminmenu .wp-has-current-submenu .wp-submenu a,
    305304#adminmenu a.wp-has-current-submenu:focus + .wp-submenu a,
    306305#adminmenu .wp-has-current-submenu.opensub .wp-submenu a {
Note: See TracChangeset for help on using the changeset viewer.