Skip to content

Commit 85c14af

Browse files
committed
fix: Fix bookmarks toolbar flickering when in sidebar-only mode
1 parent 93157bb commit 85c14af

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/zen/tabs/zen-tabs.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434

3535
/* Include styles for the top bar under certain conditions:
3636
* - Bookmarks toolbar is visible OR
37-
* - The container is explicitly marked to hide controls (e.g., on Linux with reversed controls)
37+
* - The container is explicitly marked to hide controls (e.g., on Linux with reversed controls) OR
38+
* - Sidebar is on the left (to prevent flash when toggling bookmarks)
3839
*/
3940
:root[zen-has-bookmarks] &,
40-
&[should-hide='true'] {
41+
&[should-hide='true'],
42+
:root:not([zen-right-side='true']) & {
4143
%include zen-tabs/vertical-tabs-topbar.inc.css
4244
}
4345

@@ -49,6 +51,7 @@
4951
pointer-events: none !important;
5052
}
5153
}
54+
5255
}
5356

5457

src/zen/tabs/zen-tabs/vertical-tabs-topbar.inc.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
height: var(--zen-toolbar-height);
1010
z-index: 1;
1111

12+
& .zen-toolbar-background {
13+
display: flex;
14+
}
15+
1216
#zen-appcontent-navbar-container {
1317
display: flex;
1418
min-height: var(--zen-toolbar-height);
@@ -22,7 +26,8 @@ z-index: 1;
2226

2327
%include ../../compact-mode/windows-captions-fix-active.inc.css
2428

25-
&:not([zen-has-hover='true']):not([has-popup-menu]):not([zen-compact-mode-active]) {
29+
&:not([zen-has-hover='true']):not([has-popup-menu]):not([zen-compact-mode-active]),
30+
:root:not([zen-right-side='true']):not([zen-has-bookmarks]) & {
2631
height: var(--zen-element-separation);
2732
opacity: 0;
2833
& #zen-appcontent-navbar-container {
@@ -41,3 +46,17 @@ z-index: 1;
4146
}
4247
}
4348
}
49+
50+
/* When sidebar is on left, position contents absolutely to overlay on hover */
51+
:root:not([zen-right-side='true']) & {
52+
/* Keep wrapper in flow to reserve space, but position contents absolutely */
53+
position: relative;
54+
55+
& #zen-appcontent-navbar-container {
56+
position: absolute;
57+
top: 0;
58+
left: 0;
59+
right: 0;
60+
z-index: 10;
61+
}
62+
}

0 commit comments

Comments
 (0)