Skip to content

Instantly share code, notes, and snippets.

@nash403
Created January 5, 2018 14:41
Show Gist options
  • Save nash403/42d97e1bbcf2df979dae0d2e4b0fb98e to your computer and use it in GitHub Desktop.
Save nash403/42d97e1bbcf2df979dae0d2e4b0fb98e to your computer and use it in GitHub Desktop.
Scss mixins for custom scrollbar and no scrollbar
// 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;
}
}
@TimmyKid
Copy link

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?

@nwnshin
Copy link

nwnshin commented Oct 21, 2021

Thank you! This helped a lot

@matheusxreis
Copy link

thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment