Add compatibility layer for autohide + multi-row bookmarks toolbar

This commit is contained in:
MrOtherGuy 2020-01-18 22:04:18 +02:00
parent 68a14dc4cd
commit aa9dddaccf
2 changed files with 20 additions and 8 deletions

View file

@ -1,6 +1,6 @@
#PersonalToolbar{ #PersonalToolbar{
--uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */ --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="compact"] #PersonalToolbar{ --uc-bm-padding: 1px }
@ -12,6 +12,7 @@
transform-origin: top; transform-origin: top;
transition: transform 135ms linear 600ms !important; transition: transform 135ms linear 600ms !important;
z-index: 1; z-index: 1;
} }
#PlacesToolbarItems > .bookmark-item{ padding-block: var(--uc-bm-padding) !important; } #PlacesToolbarItems > .bookmark-item{ padding-block: var(--uc-bm-padding) !important; }
@ -29,3 +30,13 @@
transition-delay: 100ms !important; transition-delay: 100ms !important;
transform: rotateX(0); 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;
}
*/

View file

@ -14,7 +14,8 @@
#PlacesToolbarItems{ #PlacesToolbarItems{
display: flex; display: flex;
flex-wrap: wrap; 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; overflow-y:auto;
scrollbar-color: var(--lwt-accent-color) var(--toolbar-bgcolor) ; scrollbar-color: var(--lwt-accent-color) var(--toolbar-bgcolor) ;
scrollbar-width: thin; scrollbar-width: thin;