Skip to content

Commit ac24f2e

Browse files
authored
Add theme: Sidebar Button Stash
1 parent cdccfde commit ac24f2e

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
2+
@media (-moz-bool-pref: "zen.view.sidebar-expanded") {
3+
:root:not([customizing]) {
4+
/* Main container setup - creates a 3-column grid with extended hover area */
5+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)) {
6+
display: grid !important;
7+
grid-template-columns: repeat(3, auto) !important;
8+
position: relative !important;
9+
z-index: 10 !important;
10+
overflow: visible !important;
11+
}
12+
13+
/* Position the three always-visible buttons */
14+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)) > *:nth-last-child(1),
15+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)) > *:nth-last-child(2),
16+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)) > *:nth-last-child(3) {
17+
grid-column: auto !important;
18+
}
19+
20+
/* Position all overflow buttons in the dropdown */
21+
#zen-sidebar-bottom-buttons:has(> :nth-child(4))
22+
> *:not(:nth-last-child(-n + 3)) {
23+
position: absolute !important;
24+
z-index: 11 !important;
25+
width: calc(100% / 3) !important;
26+
27+
/* Hide by default, show on hover */
28+
opacity: 0 !important;
29+
visibility: hidden !important;
30+
transition: opacity 0.2s ease, visibility 0.2s ease !important;
31+
}
32+
33+
/* Show overflow items on hover */
34+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)):hover
35+
> *:not(:nth-last-child(-n + 3)),
36+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)):has(
37+
*:not(:nth-last-child(-n + 3))[open="true"]
38+
)
39+
> *:not(:nth-last-child(-n + 3)) {
40+
opacity: 1 !important;
41+
visibility: visible !important;
42+
pointer-events: auto !important;
43+
}
44+
45+
/* Column positioning for overflow items */
46+
#zen-sidebar-bottom-buttons:has(> :nth-child(4))
47+
> *:nth-child(3n + 1):not(:nth-last-child(-n + 3)) {
48+
left: 0 !important;
49+
}
50+
#zen-sidebar-bottom-buttons:has(> :nth-child(4))
51+
> *:nth-child(3n + 2):not(:nth-last-child(-n + 3)) {
52+
left: calc(100% / 3) !important;
53+
}
54+
#zen-sidebar-bottom-buttons:has(> :nth-child(4))
55+
> *:nth-child(3n + 3):not(:nth-last-child(-n + 3)) {
56+
left: calc(2 * 100% / 3) !important;
57+
}
58+
59+
/* Apply specific row positioning for each group */
60+
#zen-sidebar-bottom-buttons
61+
> *:nth-child(-n + 3):not(:nth-last-child(-n + 3)) {
62+
bottom: calc(100% + 20px) !important; /* Row 2 */
63+
}
64+
#zen-sidebar-bottom-buttons
65+
> *:nth-child(n + 4):nth-child(-n + 6):not(:nth-last-child(-n + 3)) {
66+
bottom: calc(100% + 60px) !important; /* Row 3 */
67+
}
68+
#zen-sidebar-bottom-buttons
69+
> *:nth-child(n + 7):nth-child(-n + 9):not(:nth-last-child(-n + 3)) {
70+
bottom: calc(100% + 100px) !important; /* Row 4 */
71+
}
72+
#zen-sidebar-bottom-buttons
73+
> *:nth-child(n + 10):nth-child(-n + 12):not(:nth-last-child(-n + 3)) {
74+
bottom: calc(100% + 140px) !important; /* Row 5 */
75+
}
76+
#zen-sidebar-bottom-buttons
77+
> *:nth-child(n + 13):nth-child(-n + 15):not(:nth-last-child(-n + 3)) {
78+
bottom: calc(100% + 140px) !important; /* Row 6 */
79+
}
80+
#zen-sidebar-bottom-buttons
81+
> *:nth-child(n + 16):nth-child(-n + 18):not(:nth-last-child(-n + 3)) {
82+
bottom: calc(100% + 140px) !important; /* Row 7 */
83+
}
84+
#zen-sidebar-bottom-buttons
85+
> *:nth-child(n + 19):nth-child(-n + 21):not(:nth-last-child(-n + 3)) {
86+
bottom: calc(100% + 140px) !important; /* Row 8 */
87+
}
88+
#zen-sidebar-bottom-buttons
89+
> *:nth-child(n + 22):nth-child(-n + 24):not(:nth-last-child(-n + 3)) {
90+
bottom: calc(100% + 140px) !important; /* Row 9 */
91+
}
92+
#zen-sidebar-bottom-buttons
93+
> *:nth-child(n + 25):nth-child(-n + 27):not(:nth-last-child(-n + 3)) {
94+
bottom: calc(100% + 140px) !important; /* Row 10 */
95+
}
96+
97+
/* Extended hover area with blur effect */
98+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)):hover::after,
99+
#zen-sidebar-bottom-buttons:has(> :nth-child(4)):has(
100+
*:not(:nth-last-child(-n + 3))[open="true"]
101+
)::after {
102+
content: "";
103+
position: absolute !important;
104+
top: -300px !important; /* Change height according to number of buttons */
105+
left: 1px !important;
106+
right: 1px !important;
107+
bottom: 0 !important;
108+
z-index: -1 !important;
109+
pointer-events: auto !important;
110+
mask: linear-gradient(to top, black, black, transparent);
111+
border-radius: var(--zen-native-inner-radius);
112+
backdrop-filter: blur(20px);
113+
}
114+
}
115+
}
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
Stash your sidebar bottom buttons away and show them on hover.
3+
4+
Note : The last three buttons are chosen to be always shown
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": "dec34bcf-3c6b-4209-9f45-c201c9311aec",
3+
"name": "Sidebar Button Stash",
4+
"description": "Provides a way to hide bottom sidebar buttons and show them on hover",
5+
"homepage": "https://github.com/Tanay-Kar/Zen-Themes/tree/main/Sidebar%20Button%20Stash",
6+
"style": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/dec34bcf-3c6b-4209-9f45-c201c9311aec/chrome.css",
7+
"readme": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/dec34bcf-3c6b-4209-9f45-c201c9311aec/readme.md",
8+
"image": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/dec34bcf-3c6b-4209-9f45-c201c9311aec/image.png",
9+
"author": "Tanay-Kar",
10+
"version": "1.0.0",
11+
"tags": [],
12+
"createdAt": "2025-03-03",
13+
"updatedAt": "2025-03-03"
14+
}

0 commit comments

Comments
 (0)