mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-07 18:36:36 +00:00
Fix sidebar width in compact mode and add top buttons visibility fix
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
--zen-toolbox-max-width: 54px !important;
|
||||
--zen-toolbox-max-width: 64px !important;
|
||||
--zen-compact-float: calc(var(--zen-element-separation) - 1px);
|
||||
|
||||
&:not([animate='true']) {
|
||||
|
@@ -0,0 +1,8 @@
|
||||
|
||||
& #zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
|
||||
max-height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
@@ -553,13 +553,6 @@
|
||||
:root[customizing] & #zen-sidebar-icons-wrapper {
|
||||
min-width: unset !important;
|
||||
}
|
||||
#zen-sidebar-top-buttons:has(#zen-sidebar-top-buttons-customization-target:empty) {
|
||||
max-height: 0 !important;
|
||||
min-height: 0 !important;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
& #zen-sidebar-top-buttons {
|
||||
justify-content: center;
|
||||
max-height: unset !important;
|
||||
@@ -964,6 +957,8 @@
|
||||
& #zen-appcontent-navbar-container {
|
||||
padding-left: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
%include vertical-tabs-topbuttons-fix.css
|
||||
}
|
||||
|
||||
:root:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
|
||||
@@ -986,5 +981,7 @@
|
||||
& #zen-appcontent-navbar-container {
|
||||
padding-right: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
%include vertical-tabs-topbuttons-fix.css
|
||||
}
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ var gZenCompactModeManager = {
|
||||
// Do this so we can get the correct width ONCE compact mode styled have been applied
|
||||
this.sidebar.setAttribute("animate", "true");
|
||||
window.requestAnimationFrame(() => {
|
||||
let sidebarWidth = Math.max(this.sidebar.getAttribute("width"), this.sidebar.getBoundingClientRect().width);
|
||||
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
|
||||
if (canHideSidebar && isCompactMode) {
|
||||
this.sidebar.style.position = "relative";
|
||||
this.sidebar.style.transition = "margin .4s ease, opacity .4s ease";
|
||||
|
Reference in New Issue
Block a user