Make WordPress Core

Ticket #46307: 46307.diff

File 46307.diff, 1.9 KB (added by sabernhardt, 2 years ago)

expands link text on hover or focus for menu items without a submenu, inheriting the background color from #adminmenu, and adds transparent border on three sides

  • src/wp-admin/css/admin-menu.css

     
    855855                top: 46px;
    856856        }
    857857}
     858
     859@media screen and (min-width: 782.02px) {
     860        /* inherit background color from #adminmenu */
     861        .folded #adminmenu > li:not(.wp-has-submenu),
     862        .folded #adminmenu > li:not(.wp-has-submenu) > a.menu-top:is(:hover, :focus),
     863        .folded #adminmenu > li:not(.wp-has-submenu) > a.menu-top:is(:hover, :focus) > .wp-menu-name {
     864                background-color: inherit;
     865        }
     866
     867        /* show menu name where .wp-submenu-head appears */
     868        .folded #adminmenu > li:not(.wp-has-submenu) > a.menu-top:is(:hover, :focus) > .wp-menu-name {
     869                left: 36px;
     870                min-width: 160px;
     871                min-height: 34px;
     872                padding: 5px 4px 5px 16px; /* padding assigned to .wp-submenu-head plus 5px left border */
     873                box-sizing: border-box;
     874                /* Only visible in Windows High Contrast mode */
     875                border: 1px solid transparent;
     876                border-left-width: 0;
     877        }
     878}
     879
     880@media screen and (min-width: 782.02px) and (max-width: 960px) {
     881        /* inherit background color from #adminmenu */
     882        body:not(.folded) #adminmenu > li:not(.wp-has-submenu),
     883        body:not(.folded) #adminmenu > li:not(.wp-has-submenu) > a.menu-top:is(:hover, :focus),
     884        body:not(.folded) #adminmenu > li:not(.wp-has-submenu) > a.menu-top:is(:hover, :focus) > .wp-menu-name {
     885                background-color: inherit;
     886        }
     887
     888        /* show menu name where .wp-submenu-head appears */
     889        body:not(.folded) #adminmenu > li:not(.wp-has-submenu) > a.menu-top:is(:hover, :focus) > .wp-menu-name {
     890                left: 36px;
     891                min-width: 160px;
     892                min-height: 34px;
     893                padding: 5px 4px 5px 16px; /* padding assigned to .wp-submenu-head plus 5px left border */
     894                box-sizing: border-box;
     895                /* Only visible in Windows High Contrast mode */
     896                border: 1px solid transparent;
     897                border-left-width: 0;
     898        }
     899}