Skip to content

Instantly share code, notes, and snippets.

@dsdsdsdsdsds
Created September 8, 2023 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsdsdsdsdsds/526db1d5a55d6d6c70a0d1b0632feb2f to your computer and use it in GitHub Desktop.
Save dsdsdsdsdsds/526db1d5a55d6d6c70a0d1b0632feb2f to your computer and use it in GitHub Desktop.
Scrollbar SASS mixin
@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