mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-24 21:40:22 +08:00
29 lines
680 B
SCSS
29 lines
680 B
SCSS
@mixin scrollbar($size: 7px, $color: rgba(0, 0, 0, 0.5), $dark-color: rgba(255, 255, 255, 0.5)) {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: $color transparent;
|
|
|
|
// Dark theme override
|
|
.dark & {
|
|
// guide safari use light color scrollbar
|
|
color-scheme: dark;
|
|
scrollbar-color: $dark-color transparent;
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
background-color: $color;
|
|
border-radius: $size;
|
|
}
|
|
&::-webkit-scrollbar-thumb:hover {
|
|
background-color: $color;
|
|
border-radius: $size;
|
|
}
|
|
&::-webkit-scrollbar {
|
|
width: $size;
|
|
height: $size;
|
|
}
|
|
&::-webkit-scrollbar-track-piece {
|
|
background-color: rgba(0, 0, 0, 0);
|
|
border-radius: 0;
|
|
}
|
|
}
|