Refactor compact mode styles and improve sidebar width handling

This commit is contained in:
mr. M
2024-12-21 23:35:37 +01:00
parent 7a0fcc3f35
commit 3f5ee4c6fb
4 changed files with 18 additions and 12 deletions

View File

@@ -173,7 +173,6 @@
width: 100%;
opacity: 0;
background: var(--zen-dialog-background);
padding-left: var(--zen-toolbox-padding) !important;
max-height: var(--zen-toolbar-height);
overflow: hidden;
@@ -187,11 +186,6 @@
transition: transform 0.1s ease-in-out;
}
:root[zen-window-buttons-reversed='true'] & {
padding-left: 0 !important;
padding-right: var(--zen-toolbox-padding) !important;
}
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
background-attachment: fixed;
backdrop-filter: blur(5px);

View File

@@ -33,8 +33,8 @@ height: var(--zen-toolbar-height);
}
:root[inDOMFullscreen='true'] & {
max-height: 0;
max-height: 0 !important;
min-height: unset !important;
opacity: 0;
pointer-events: none;
opacity: 0 !important;
pointer-events: none !important;
}

View File

@@ -306,8 +306,18 @@ button.popup-notification-dropmarker {
align-items: center;
}
:root:not([zen-single-toolbar='true']) #nav-bar {
margin-bottom: -1px;
:root:not([zen-single-toolbar='true']) {
& #nav-bar {
margin-bottom: -1px;
}
&[zen-right-side='true']:not([zen-window-buttons-reversed='true']) #nav-bar {
margin-inline-start: var(--zen-element-separation);
}
&:not([zen-right-side='true'])[zen-window-buttons-reversed='true'] #nav-bar {
margin-inline-end: var(--zen-element-separation);
}
}
/* Other small tweaks */

View File

@@ -103,7 +103,9 @@ var gZenCompactModeManager = {
getAndApplySidebarWidth() {
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
this.sidebar.style.setProperty("--zen-sidebar-width", `${sidebarWidth}px`);
if (sidebarWidth > 1) {
this.sidebar.style.setProperty("--zen-sidebar-width", `${sidebarWidth}px`);
}
return sidebarWidth;
},