Skip to content

Commit d1f3775

Browse files
authored
Mobile admin bar is now accounted for
Mobile admin bar is now accounted for as plugins have recently been adding their own items to the mobile menu as well & potentially causing items wrap onto a new line outside of the admin bar given the available space. Instead of wrapping to overlap the actual content, it simply offers a horizontal scroll for when there are too many items to show on screen at once (keeping the items all within the admin bar's one row of icons.)
1 parent 0fa39b6 commit d1f3775

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

src/wp-includes/css/admin-bar.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ html:lang(he-il) .rtl #wpadminbar * {
720720
}
721721

722722
@media screen and (min-width: 782px) {
723-
/* Prevent wrapping of admin bar that has more items than admin bar area (mobile-friendly toolbar doesn't need this) */
723+
/* Prevent wrapping of admin bar that has more items than admin bar area on desktop/tablet layout */
724724
#wpadminbar .quicklinks {
725725
justify-content: space-between;
726726
}
@@ -1052,6 +1052,25 @@ html:lang(he-il) .rtl #wpadminbar * {
10521052
top: 10px;
10531053
left: 0;
10541054
}
1055+
/* Prevent wrapping of admin bar that has more items than admin bar area on mobile layout */
1056+
#wpcontent {
1057+
padding-top: 15px;
1058+
}
1059+
#wpadminbar {
1060+
display: flex;
1061+
flex-wrap: nowrap;
1062+
padding-bottom: 15px;
1063+
overflow-x: scroll;
1064+
overflow-y: hidden;
1065+
}
1066+
#wpadminbar > *,
1067+
#wpadminbar .ab-top-menu {
1068+
display: flex;
1069+
flex-wrap: nowrap;
1070+
}
1071+
#wpadminbar .ab-sub-wrapper {
1072+
display: none !important;
1073+
}
10551074
}
10561075

10571076
/* Smartphone */

0 commit comments

Comments
 (0)