diff --git a/src/wp-admin/css/admin-menu.css b/src/wp-admin/css/admin-menu.css index 7889a3e76008c..0abe3c1eda2ee 100644 --- a/src/wp-admin/css/admin-menu.css +++ b/src/wp-admin/css/admin-menu.css @@ -786,12 +786,10 @@ li#wp-admin-bar-menu-toggle { display: block; padding: 0; overflow: hidden; - outline: none; text-decoration: none; - border: 1px solid transparent; background: none; - height: 44px; - margin-left: -1px; + height: 46px; + box-sizing: border-box; } .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a { @@ -802,22 +800,17 @@ li#wp-admin-bar-menu-toggle { display: block; } - #wpadminbar #wp-admin-bar-menu-toggle a:hover { - border: 1px solid transparent; - } - #wpadminbar #wp-admin-bar-menu-toggle .ab-icon::before { content: "\f228"; display: inline-block; float: left; - font: 400 40px/45px dashicons; + font: 400 40px/46px dashicons; vertical-align: middle; - outline: none; margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - height: 44px; - width: 50px; + height: 46px; + width: 52px; padding: 0; border: none; text-align: center; diff --git a/src/wp-admin/css/colors/_admin.scss b/src/wp-admin/css/colors/_admin.scss index 366f1b86b4f16..4bd0390558afd 100644 --- a/src/wp-admin/css/colors/_admin.scss +++ b/src/wp-admin/css/colors/_admin.scss @@ -416,9 +416,11 @@ ul#adminmenu > li.current > a.current:after { background: variables.$menu-submenu-background; } -#wpadminbar:not(.mobile) > #wp-toolbar li:hover span.ab-label, -#wpadminbar:not(.mobile) > #wp-toolbar li.hover span.ab-label, -#wpadminbar:not(.mobile) > #wp-toolbar a:focus span.ab-label { +#wpadminbar > #wp-toolbar li:hover span.ab-label, +#wpadminbar > #wp-toolbar li.hover span.ab-label, +/* The adminbar menu may output either links or focusable div elements. */ +/* As such, we target the focus state without specifying the element type. */ +#wpadminbar > #wp-toolbar :focus span.ab-label { color: variables.$menu-submenu-focus-text; } @@ -449,7 +451,9 @@ ul#adminmenu > li.current > a.current:after { } #wpadminbar .quicklinks li .blavatar, -#wpadminbar .menupop .menupop > .ab-item:before { +#wpadminbar .menupop .menupop > .ab-item::before, +#wpadminbar.mobile .quicklinks .ab-icon::before, +#wpadminbar.mobile .quicklinks .ab-item::before { color: variables.$menu-icon; } @@ -474,21 +478,17 @@ ul#adminmenu > li.current > a.current:after { color: variables.$menu-submenu-focus-text; } +// Note that the icon of the site-name item is not wrapped within a span with class ab-icon like other items. #wpadminbar .quicklinks li a:hover .blavatar, #wpadminbar .quicklinks li a:focus .blavatar, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a .blavatar, -#wpadminbar .menupop .menupop > .ab-item:hover:before, -#wpadminbar.mobile .quicklinks .hover .ab-icon:before, -#wpadminbar.mobile .quicklinks .hover .ab-item:before { +#wpadminbar .menupop .menupop > .ab-item:hover::before, +#wpadminbar.mobile .quicklinks .hover .ab-icon::before, +#wpadminbar.mobile .quicklinks .hover .ab-item::before, +#wpadminbar.mobile .quicklinks .ab-item:focus::before { color: variables.$menu-submenu-focus-text; } -#wpadminbar.mobile .quicklinks .ab-icon:before, -#wpadminbar.mobile .quicklinks .ab-item:before { - color: variables.$menu-icon; -} - - /* Admin Bar: search */ #wpadminbar #adminbarsearch:before { @@ -531,14 +531,17 @@ ul#adminmenu > li.current > a.current:after { color: variables.$menu-text; } -#wpadminbar #wp-admin-bar-user-info a:hover .display-name { - color: variables.$menu-submenu-focus-text; -} - #wpadminbar #wp-admin-bar-user-info .username { color: variables.$menu-submenu-text; } +#wpadminbar #wp-admin-bar-user-info a:hover .display-name, +#wpadminbar #wp-admin-bar-user-info a:focus .display-name, +#wpadminbar #wp-admin-bar-user-info a:hover .username, +#wpadminbar #wp-admin-bar-user-info a:focus .username { + color: variables.$menu-submenu-focus-text; +} + /* Pointers */ diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css index 61f240be3a6f5..7705f03d6d86c 100644 --- a/src/wp-includes/css/admin-bar.css +++ b/src/wp-includes/css/admin-bar.css @@ -78,10 +78,16 @@ html:lang(he-il) .rtl #wpadminbar * { box-shadow: none; } -#wpadminbar a:focus { - outline-offset: -1px; - /* Only visible in Windows High Contrast mode */ - outline: 2px solid transparent; +#wpadminbar a, +#wpadminbar .ab-item[tabindex="0"] { + border-radius: 5px; +} + +#wpadminbar a:focus, +#wpadminbar .ab-item[tabindex="0"]:focus { + outline-offset: -4px; + /* Always visible, also in Windows High Contrast mode */ + outline: var(--wp-admin-border-width-focus, 1.5px) solid var(--wp-admin-theme-color); } #wpadminbar { @@ -222,7 +228,9 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar:not(.mobile) > #wp-toolbar li:hover span.ab-label, #wpadminbar > #wp-toolbar li.hover span.ab-label, -#wpadminbar:not(.mobile) > #wp-toolbar a:focus span.ab-label { +/* The adminbar menu may output either links or focusable div elements. */ +/* As such, we target the focus state without specifying the element type. */ +#wpadminbar > #wp-toolbar :focus span.ab-label { color: #72aee6; } @@ -286,7 +294,8 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar li.hover .ab-icon::before, #wpadminbar li.hover .ab-item::before, #wpadminbar li:hover #adminbarsearch::before, -#wpadminbar li #adminbarsearch.adminbar-focused::before { +#wpadminbar li #adminbarsearch.adminbar-focused:before, +#wpadminbar.mobile .quicklinks .ab-item:focus:before { color: #72aee6; } @@ -371,11 +380,6 @@ html:lang(he-il) .rtl #wpadminbar * { float: right; } -#wpadminbar ul li:last-child, -#wpadminbar ul li:last-child .ab-item { - box-shadow: none; -} - /** * Recovery Mode */ @@ -435,8 +439,8 @@ html:lang(he-il) .rtl #wpadminbar * { } #wpadminbar #wp-admin-bar-user-info { - margin-top: 6px; - margin-bottom: 15px; + margin-top: 2px; + margin-bottom: 10px; height: auto; background: none; } @@ -444,7 +448,7 @@ html:lang(he-il) .rtl #wpadminbar * { #wp-admin-bar-user-info .avatar { position: absolute; left: -72px; - top: 4px; + top: 0; width: 64px; height: 64px; border-radius: 50%; @@ -453,12 +457,13 @@ html:lang(he-il) .rtl #wpadminbar * { #wpadminbar #wp-admin-bar-user-info a { background: none; height: auto; + padding: 4px 10px; } #wpadminbar #wp-admin-bar-user-info span { background: none; padding: 0; - height: 18px; + line-height: 1.38461538; } #wpadminbar #wp-admin-bar-user-info .display-name, @@ -467,7 +472,6 @@ html:lang(he-il) .rtl #wpadminbar * { } #wpadminbar #wp-admin-bar-user-info .username { - color: #a7aaad; font-size: 11px; } @@ -906,7 +910,6 @@ html:lang(he-il) .rtl #wpadminbar * { overflow: hidden; width: 52px; padding: 0; - color: #a7aaad; /* @todo not needed? this text is hidden */ position: relative; } @@ -1034,16 +1037,6 @@ html:lang(he-il) .rtl #wpadminbar * { height: auto; font-size: 16px; line-height: 1.5; - color: #f0f0f1; - } - - #wpadminbar #wp-admin-bar-user-info a { - padding-top: 4px; - } - - #wpadminbar #wp-admin-bar-user-info .username { - line-height: 0.8 !important; - margin-bottom: -2px; } /* Show only default top level items */