Make WordPress Core

Ticket #32579: dropdown-focus.diff

File dropdown-focus.diff, 2.6 KB (added by ryelle, 3 years ago)
  • src/wp-admin/css/admin-menu.css

     
    207207        left: 160px;
    208208        overflow: visible;
    209209        word-wrap: break-word;
    210 }
    211 
    212 #adminmenu .wp-submenu,
    213 .folded #adminmenu a.wp-has-current-submenu:focus + .wp-submenu,
    214 .folded #adminmenu .wp-has-current-submenu .wp-submenu {
    215210        padding: 7px 0 8px;
    216211        z-index: 9999;
    217212        background-color: #32373c;
     
    239234        border: 0 none;
    240235        margin-top: 0;
    241236        box-shadow: none;
    242         background-color: #32373c;
    243237}
    244238
     239.folded #adminmenu .wp-has-current-submenu .wp-submenu {
     240        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
     241}
     242
    245243/* ensure that wp-submenu's box shadow doesn't appear on top of the focused menu item's background. */
    246244#adminmenu li.menu-top:hover,
    247245#adminmenu li.opensub > a.menu-top,
     
    259257
    260258#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
    261259#adminmenu li.current a.menu-top,
    262 .folded #adminmenu li.wp-has-current-submenu,
    263 .folded #adminmenu li.current.menu-top,
    264260#adminmenu .wp-menu-arrow,
    265261#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,
    266262#adminmenu .wp-menu-arrow div {
     
    438434        margin-top: -8px;
    439435}
    440436
    441 .folded ul#adminmenu li:hover a.wp-has-current-submenu:after {
     437.folded ul#adminmenu li:hover a.wp-has-current-submenu:after,
     438.folded ul#adminmenu li.wp-has-current-submenu:focus-within a.wp-has-current-submenu:after {
    442439        display: none;
    443440}
    444441
     
    831828                display: block;
    832829        }
    833830
    834         .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after {
     831        .auto-fold ul#adminmenu li:hover a.wp-has-current-submenu:after,
     832        .auto-fold ul#adminmenu li.wp-has-current-submenu:focus-within a.wp-has-current-submenu:after {
    835833                display: block;
    836834        }
    837835
  • src/wp-admin/css/colors/_admin.scss

     
    286286#adminmenu .wp-submenu,
    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}
     
    301300
    302301#adminmenu .wp-submenu a,
    303302#adminmenu .wp-has-current-submenu .wp-submenu a,
    304 .folded #adminmenu .wp-has-current-submenu .wp-submenu a,
    305303#adminmenu a.wp-has-current-submenu:focus + .wp-submenu a,
    306304#adminmenu .wp-has-current-submenu.opensub .wp-submenu a {
    307305        color: $menu-submenu-text;