-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Prevent Admin Bar Items From Wrapping if There's More Items Than the Available Adminbar Width #1082
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 1 commit
f9c250a
0fa39b6
d1f3775
6b4d0ba
f3f1f48
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 |
|---|---|---|
|
|
@@ -138,6 +138,11 @@ html:lang(he-il) .rtl #wpadminbar * { | |
| padding: 0 8px 0 7px; | ||
| } | ||
|
|
||
| #wpadminbar .quicklinks > ul > li, | ||
| #wpadminbar .quicklinks .ab-item { | ||
| max-width: 100px; /* Improve spacing and prevent Site Title from eating WP Logo */ | ||
| } | ||
|
|
||
| #wpadminbar .menupop .ab-sub-wrapper, | ||
| #wpadminbar .shortlink-input { | ||
| margin: 0; | ||
|
|
@@ -719,6 +724,50 @@ html:lang(he-il) .rtl #wpadminbar * { | |
| box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); | ||
| } | ||
|
|
||
| @media only screen and (min-width: 1061px) { | ||
|
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. I could see this being an optional include as this was simply proposed at https://wordpress.org/support/topic/awesome-plugin-works-great-13/ while it then didn't seem to be harmful & seemed to help at least one person out there. |
||
| /* Reset the spacing */ | ||
| #wpadminbar .quicklinks > ul > li, | ||
| #wpadminbar .quicklinks .ab-item { | ||
| max-width: initial; | ||
| text-overflow: clip; | ||
| } | ||
| } | ||
| @media screen and (min-width: 782px) { | ||
|
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 is really the heart of this update. Utilize flexbox on the admin bar where it allows plugins to add items to it so that it never overflows onto a new line (instead, scaling proportionally and using an ellipses-based text overflow when needed & looking effectively the same as before when not needed.) |
||
| /* Prevent wrapping of admin bar that has more items than admin bar area (mobile-friendly toolbar doesn't need this) */ | ||
| #wpadminbar .quicklinks { | ||
| justify-content: space-between; | ||
| } | ||
| #wpadminbar .quicklinks > ul > li { | ||
| float: none !important; | ||
| } | ||
| #wpadminbar .quicklinks > ul > li, | ||
| #wpadminbar .quicklinks .ab-item { | ||
| white-space: nowrap; | ||
| text-overflow: ellipsis; | ||
| min-width: 0 !important; | ||
| } | ||
| #wpadminbar .quicklinks .ab-item { | ||
| overflow: hidden; | ||
| } | ||
| #wpadminbar .quicklinks .ab-item .ab-label, | ||
| #wpadminbar .quicklinks .ab-item .display-name { | ||
| float: none; | ||
| display: inline; | ||
| } | ||
| #wpadminbar .quicklinks, | ||
| #wpadminbar .quicklinks > ul { | ||
| display: -ms-flexbox; | ||
| display: flex; | ||
| flex-wrap: nowrap; | ||
| -ms-flex-wrap: nowrap; | ||
| min-width: 0 !important; | ||
| } | ||
| #wpadminbar #wp-admin-bar-top-secondary { | ||
| flex-direction: row-reverse; | ||
| -ms-flex-direction: row-reverse; | ||
| } | ||
| } | ||
|
|
||
| @media screen and (max-width: 782px) { | ||
| /* Toolbar Touchification*/ | ||
| html #wpadminbar { | ||
|
|
||
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.
I could see this being an optional include as this was simply proposed at https://wordpress.org/support/topic/awesome-plugin-works-great-13/ while it then didn't seem to be harmful & seemed to help at least one person out there.