Created
September 8, 2023 07:20
-
-
Save dsdsdsdsdsds/526db1d5a55d6d6c70a0d1b0632feb2f to your computer and use it in GitHub Desktop.
Scrollbar SASS mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin scrollbars( | |
$size: 10px, | |
$foreground-color: white, | |
$background-color: black | |
) { | |
// For Chrome & Safari | |
&::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} | |
&::-webkit-scrollbar-thumb { | |
background: $foreground-color; | |
border-radius: $size; | |
} | |
&::-webkit-scrollbar-track { | |
background: $background-color; | |
border-radius: $size; | |
} | |
// Standard version (Firefox only for now) | |
scrollbar-color: $foreground-color $background-color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment