Skip to content

Commit 068cbad

Browse files
committed
refactor: update scrollbars styles for Windows browsers
1 parent 24ba83e commit 068cbad

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

scss/sidebar/_sidebar-nav.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,35 @@
1111
overflow-y: auto;
1212
list-style: none;
1313

14+
// Firefox scrollbars
15+
@-moz-document url-prefix() {
16+
scrollbar-width: thin;
17+
}
18+
19+
// Chrome, Edge scrollbars
20+
21+
/* total width */
22+
&::-webkit-scrollbar {
23+
width: 8px;
24+
background-color: transparent;
25+
}
26+
27+
/* background of the scrollbar except button or resizer */
28+
&::-webkit-scrollbar-track {
29+
background-color: transparent;
30+
}
31+
32+
/* scrollbar itself */
33+
&::-webkit-scrollbar-thumb {
34+
background-color: rgba(0, 0, 0, .375);
35+
@include border-radius(8px);
36+
}
37+
38+
/* set button(top and bottom of the scrollbar) */
39+
&::-webkit-scrollbar-button {
40+
display: none;
41+
}
42+
1443
.nav-title {
1544
padding: $sidebar-nav-title-padding-y $sidebar-nav-title-padding-x;
1645
margin-top: $sidebar-nav-title-margin-top;

0 commit comments

Comments
 (0)