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

@@ -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;
},