Last active
July 29, 2021 07:39
-
-
Save SnisarOnline/b7284d1a1695f456c8488c746d316d59 to your computer and use it in GitHub Desktop.
SCSS-mixin для быстрого ре-дизайна стандартного scrollbars
This file contains 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
/** | |
* @see https://css-tricks.com/custom-scrollbars-in-webkit/ | |
*/ | |
@mixin scrollbars($size, $foreground-color, $background-color: mix($foreground-color, white, 50%)) { | |
// For Google Chrome | |
&::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} | |
&::-webkit-scrollbar-thumb { | |
background: $foreground-color; | |
border-radius: 20px; | |
} | |
&::-webkit-scrollbar-track { | |
background: $background-color; | |
background-image: $background-color; | |
} | |
// For Internet Explorer | |
& { | |
scrollbar-face-color: $foreground-color; | |
scrollbar-track-color: $background-color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment