-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Improve the admin bar focus style #12179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -77,10 +77,18 @@ html:lang(he-il) .rtl #wpadminbar * { | |||||
| box-shadow: none; | ||||||
| } | ||||||
|
|
||||||
| #wpadminbar a:focus { | ||||||
| #wpadminbar a:focus, | ||||||
| #wpadminbar .ab-item[tabindex="0"]:focus { | ||||||
| outline-offset: -1px; | ||||||
| /* Only visible in Windows High Contrast mode */ | ||||||
| outline: 2px solid transparent; | ||||||
| box-shadow: inset 0 -4px 0 0 currentColor; | ||||||
| transition: box-shadow .1s linear; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Core is not perfectly consistent about the leading zero, but it is in the coding standards.
Suggested change
|
||||||
| } | ||||||
|
|
||||||
| #wpadminbar .ab-submenu a:focus, | ||||||
| #wpadminbar .ab-submenu .ab-item[tabindex="0"]:focus { | ||||||
| box-shadow: inset 4px 0 0 0 currentColor; | ||||||
| } | ||||||
|
|
||||||
| #wpadminbar { | ||||||
|
|
@@ -379,11 +387,6 @@ html:lang(he-il) .rtl #wpadminbar * { | |||||
| float: right; | ||||||
| } | ||||||
|
|
||||||
| #wpadminbar ul li:last-child, | ||||||
| #wpadminbar ul li:last-child .ab-item { | ||||||
| box-shadow: none; | ||||||
| } | ||||||
|
|
||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be double checked. I have no idea why the last item in a menu was supposed to not use a box-shadow. Had to remove it otherwise the new focus style wouldn't work.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did some exploring, but I couldn't see any good reason for it, either. I thought it could be a leftover from some older styles, but couldn't find evidence of that. It's old; been there since at least 3.3. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not know of a reason to keep it either (otherwise, the specificity could be reduced). r19328 added the
|
||||||
| /** | ||||||
| * Recovery Mode | ||||||
| */ | ||||||
|
|
@@ -452,20 +455,22 @@ html:lang(he-il) .rtl #wpadminbar * { | |||||
| #wp-admin-bar-user-info .avatar { | ||||||
| position: absolute; | ||||||
| left: -72px; | ||||||
| top: 4px; | ||||||
| top: 0; | ||||||
| width: 64px; | ||||||
| height: 64px; | ||||||
| } | ||||||
|
|
||||||
| #wpadminbar #wp-admin-bar-user-info a { | ||||||
| background: none; | ||||||
| height: auto; | ||||||
| position: relative; | ||||||
| top: 4px; | ||||||
| } | ||||||
|
|
||||||
| #wpadminbar #wp-admin-bar-user-info span { | ||||||
| background: none; | ||||||
| padding: 0; | ||||||
| height: 18px; | ||||||
| line-height: 1.38461538; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the However, the
If the separation is unimportant, at least the small
|
||||||
| } | ||||||
|
|
||||||
| #wpadminbar #wp-admin-bar-user-info .display-name, | ||||||
|
|
||||||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
currentColorhas a conflict on narrower screens for core links with icons attached to.ab-item::before. Removing the old rule should fix it.#999for.ab-itemin the 'my-sites' and 'site-name' nodes on small screens.colorrule was necessary.colors.cssstylesheets use#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus, so plugins such as "View Admin As" would display the correct color even though they have their icon on the::beforepseudo-element.#999as the color, and that would need updating.