Skip to content

Commit 5809047

Browse files
fix: improve scrollbar and support firefox
1 parent f28f007 commit 5809047

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

src/styles/custom.css

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,41 @@
3030
}
3131

3232
/* Custom scrollbar */
33-
:root[data-theme="light"] ::-webkit-scrollbar-track {
34-
background: #f1f1f1;
33+
::-webkit-scrollbar {
34+
width: 4px;
35+
}
36+
37+
::-webkit-scrollbar-track {
38+
background-color: #F5F5F5;
39+
border-radius: 2px;
3540
}
3641

37-
:root[data-theme="light"] ::-webkit-scrollbar-thumb {
38-
background: #888;
42+
::-webkit-scrollbar-thumb {
43+
background-color: #C1C1C1;
44+
border-radius: 2px;
3945
}
4046

41-
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
42-
background: #555;
47+
::-webkit-scrollbar-thumb:hover {
48+
background-color: #A8A8A8;
4349
}
4450

4551
:root[data-theme="dark"] ::-webkit-scrollbar-track {
46-
background: #2a2a2a;
52+
background-color: #2D2A32;
4753
}
4854

4955
:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
50-
background: #666;
56+
background-color: #4A4458;
5157
}
5258

5359
:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
54-
background: #aaa;
60+
background-color: #5A5466;
5561
}
5662

57-
::-webkit-scrollbar {
58-
width: 8px;
63+
* {
64+
scrollbar-width: thin;
65+
scrollbar-color: #C1C1C1 #F5F5F5;
5966
}
6067

61-
::-webkit-scrollbar-thumb {
62-
border-radius: 4px;
68+
:root[data-theme="dark"] * {
69+
scrollbar-color: #4A4458 #2D2A32;
6370
}

0 commit comments

Comments
 (0)