Skip to content

Commit 5f5aadf

Browse files
committed
style(sidenav): add minimal, rounded scrollbar\n\n- Thin 8px WebKit scrollbar with rounded thumb\n- Subtle hover/active contrast; transparent track\n- Firefox: use scrollbar-width: thin; themed colors\n
1 parent ba1e65a commit 5f5aadf

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/components/sidebar/style.module.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,32 @@
2020
height: 100vh;
2121
overflow-y: auto;
2222

23+
/* Minimal, accessible scrollbar styling */
24+
/* Firefox */
25+
scrollbar-width: thin;
26+
scrollbar-color: var(--gray-a6) transparent;
27+
28+
/* WebKit (Chrome, Edge, Safari) */
29+
&::-webkit-scrollbar {
30+
width: 8px;
31+
height: 8px;
32+
}
33+
&::-webkit-scrollbar-track {
34+
background: transparent;
35+
}
36+
&::-webkit-scrollbar-thumb {
37+
background-color: var(--gray-a6);
38+
border-radius: 9999px;
39+
border: 2px solid transparent; /* creates inner padding for a lighter feel */
40+
background-clip: content-box;
41+
}
42+
&:hover::-webkit-scrollbar-thumb {
43+
background-color: var(--gray-a7);
44+
}
45+
&::-webkit-scrollbar-thumb:active {
46+
background-color: var(--gray-a8);
47+
}
48+
2349
@media only screen and (min-width: 768px) {
2450
position: fixed;
2551
left: 0;

0 commit comments

Comments
 (0)