1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 11:25:29 +02:00

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
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
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;
},