From aa9dddaccf5f0df414873d9265ab66cac6d21310 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 18 Jan 2020 22:04:18 +0200 Subject: [PATCH] Add compatibility layer for autohide + multi-row bookmarks toolbar --- chrome/autohide_bookmarks_toolbar.css | 25 ++++++++++++++++++------- chrome/multi-row_bookmarks.css | 3 ++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/chrome/autohide_bookmarks_toolbar.css b/chrome/autohide_bookmarks_toolbar.css index 7490aee..f4dd9a2 100644 --- a/chrome/autohide_bookmarks_toolbar.css +++ b/chrome/autohide_bookmarks_toolbar.css @@ -1,17 +1,18 @@ #PersonalToolbar{ --uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */ - --uc-bm-padding: 3px; /* Vertical padding to be applied to bookmarks */ + --uc-bm-padding: 2px; /* Vertical padding to be applied to bookmarks */ } :root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px } :root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 6px } #PersonalToolbar:not([customizing]){ - margin-bottom: calc(2px - var(--uc-bm-height) - 2 * var(--uc-bm-padding)); - transform: rotateX(90deg); - transform-origin: top; - transition: transform 135ms linear 600ms !important; + margin-bottom: calc(2px - var(--uc-bm-height) - 2 * var(--uc-bm-padding)); + transform: rotateX(90deg); + transform-origin: top; + transition: transform 135ms linear 600ms !important; z-index: 1; + } #PlacesToolbarItems > .bookmark-item{ padding-block: var(--uc-bm-padding) !important; } @@ -26,6 +27,16 @@ /* Show when cursor is over the toolbar area */ #navigator-toolbox:hover > #PersonalToolbar{ - transition-delay: 100ms !important; - transform: rotateX(0); + transition-delay: 100ms !important; + transform: rotateX(0); } + +/* Uncomment to enable compatibility for multi-row_bookmarks.css */ +/* This would break buttons placed in the toolbar but that is likely not happening if you are using multi-row setup */ +/* +#PersonalToolbar:not([customizing]){ + position: fixed; + display: block; + margin-bottom: 0px !important; +} +*/ \ No newline at end of file diff --git a/chrome/multi-row_bookmarks.css b/chrome/multi-row_bookmarks.css index e69f71c..938e4ae 100755 --- a/chrome/multi-row_bookmarks.css +++ b/chrome/multi-row_bookmarks.css @@ -14,7 +14,8 @@ #PlacesToolbarItems{ display: flex; flex-wrap: wrap; - max-height: calc(var(--multirow-bmb-n-rows) * (6px + 1em + (2 * var(--multirow-bmb-row-margin))) + 2px) !important; + /* --uc-bm-padding is defined in autohide_bookmarks_toolbar.css */ + max-height: calc(var(--multirow-bmb-n-rows) * (5px + 1em + (2 * (var(--multirow-bmb-row-margin) + var(--uc-bm-padding,2px))))) !important; overflow-y:auto; scrollbar-color: var(--lwt-accent-color) var(--toolbar-bgcolor) ; scrollbar-width: thin;