Skip to content

Commit dac5075

Browse files
whyang9701honghuangdc
authored andcommitted
fix(styles): show light color scrollbar while dark mode is on
1 parent a8d1e5d commit dac5075

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/styles/scss/scrollbar.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
@mixin scrollbar($size: 7px, $color: rgba(0, 0, 0, 0.5)) {
1+
@mixin scrollbar($size: 7px, $color: rgba(0, 0, 0, 0.5), $dark-color: rgba(255, 255, 255, 0.5)) {
22
scrollbar-width: thin;
33
scrollbar-color: $color transparent;
44

5+
// Dark theme override
6+
.dark & {
7+
// guide safari use light color scrollbar
8+
color-scheme: dark;
9+
scrollbar-color: $dark-color transparent;
10+
}
11+
512
&::-webkit-scrollbar-thumb {
613
background-color: $color;
714
border-radius: $size;

0 commit comments

Comments
 (0)