Created
January 5, 2018 14:41
-
-
Save nash403/42d97e1bbcf2df979dae0d2e4b0fb98e to your computer and use it in GitHub Desktop.
Scss mixins for custom scrollbar and no scrollbar
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
// custom scroll-bar | |
@mixin custom-scroll-bar() { | |
&::-webkit-scrollbar { | |
border-radius: 10px; | |
height: 10px; | |
width: 8px; | |
} | |
&::-webkit-scrollbar-thumb { | |
background: #999; | |
border-radius: 10px; | |
} | |
&::-webkit-scrollbar-track { | |
border-radius: 10px; | |
} | |
} | |
// no scroll bar | |
@mixin no-scroll-bar() { | |
&::-webkit-scrollbar { | |
height: 0; | |
width: 0; | |
} | |
&::-webkit-scrollbar-thumb { | |
height: 0; | |
width: 0; | |
} | |
&::-webkit-scrollbar-track { | |
height: 0; | |
width: 0; | |
} | |
} |
thanks! it works great! :D
Thank you very much!
Thank you!
what is the purpose of setting height e.g. as 10px? Haven't notice any difference
what is the purpose of setting height e.g. as 10px? Haven't notice any difference
@kolkol69 it is for horizontal scrolling.
Thanks, this helps for the -webkit- versions but not the -ms- versions, while I'm also not sure about the rest. Anyway to write this out for these other browser?
Thank you! This helped a lot
thanks ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This helps a lot! Thanks :)