Skip to content

Commit

Permalink
Version 1.2 release. Mobile admin bar is now accounted for as plugins…
Browse files Browse the repository at this point in the history
… 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.)
  • Loading branch information
KZeni committed May 31, 2021
1 parent 9f643c2 commit e2481ab
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
2 changes: 2 additions & 0 deletions admin-bar-wrap-fix.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion admin-bar-wrap-fix.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions admin-bar-wrap-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* Author: KZeni
* Author URI: https://kzeni.com
* License: GPLv3
* Version: 1.1
* Version: 1.2
* Requires at least: 4.6
* Tested up to: 5.7
*/

define('ADMIN_BAR_WRAP_FIX_PLUGIN_VERSION', '1.1');
define('ADMIN_BAR_WRAP_FIX_PLUGIN_VERSION', '1.2');
define('ADMIN_BAR_WRAP_FIX_PLUGIN_PRIMARY_FILE', __FILE__);
define('ADMIN_BAR_WRAP_FIX_PLUGIN_DIR_PATH', plugin_dir_path(ADMIN_BAR_WRAP_FIX_PLUGIN_PRIMARY_FILE));
define('ADMIN_BAR_WRAP_FIX_PLUGIN_DIR_URL', plugin_dir_url(ADMIN_BAR_WRAP_FIX_PLUGIN_PRIMARY_FILE));
Expand Down
23 changes: 22 additions & 1 deletion admin-bar-wrap-fix.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@media screen and (min-width: 782px) {
// Prevent wrapping of admin bar that has more items than admin bar area
// Prevent wrapping of admin bar that has more items than admin bar area on desktop/tablet layout
#wpadminbar {
.quicklinks {
justify-content: space-between;
Expand Down Expand Up @@ -35,3 +35,24 @@
}
}
}
@media screen and (max-width: 782px) {
// Prevent wrapping of admin bar that has more items than admin bar area on mobile layout
#wpcontent {
padding-top: 15px; // Browser scrollbar dimension per https://codepen.io/sambible/post/browser-scrollbar-widths(with the overflow-y:hidden; handling the difference between them)
}
#wpadminbar {
display: flex;
flex-wrap: nowrap;
padding-bottom: 15px; // Browser scrollbar dimension per https://codepen.io/sambible/post/browser-scrollbar-widths (with the overflow-y:hidden; handling the difference between them)
overflow-x: scroll;
overflow-y: hidden;
> *,
.ab-top-menu {
display: flex;
flex-wrap: nowrap;
}
.ab-sub-wrapper {
display: none !important;
}
}
}
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: KZeni
Donate link: https://www.paypal.me/KZeni
License: GPLv3
Tags: Admin Bar, adminbar, ui, ui fix, overflow, wrapping
Stable tag: 1.1
Stable tag: 1.2
Tested up to: 5.7
Requires at least: 4.6
Requires PHP: 5.4
Expand All @@ -30,6 +30,12 @@ I would think so. This has been submitted as a patch at [core ticket #44438](htt

== Changelog ==

= 1.2 =

Released May 31st, 2021

* 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.1 =

Released March 25th, 2021
Expand Down

0 comments on commit e2481ab

Please sign in to comment.