Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/wp-includes/css/admin-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ html:lang(he-il) .rtl #wpadminbar * {
padding: 0 8px 0 7px;
}

#wpadminbar .quicklinks > ul > li,
Copy link
Copy Markdown
Author

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.

#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;
Expand Down Expand Up @@ -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) {
Copy link
Copy Markdown
Author

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.

/* Reset the spacing */
#wpadminbar .quicklinks > ul > li,
#wpadminbar .quicklinks .ab-item {
max-width: initial;
text-overflow: clip;
}
}
@media screen and (min-width: 782px) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The 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 {
Expand Down