Created
May 28, 2024 15:27
-
-
Save tralves/aeae987e43f57757024ca9d7b141e1aa to your computer and use it in GitHub Desktop.
Pretty native scrollbars (webkit and mozilla)
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
/* Pretty scrollbars */ | |
@-moz-document url-prefix() { | |
.pretty-scrollbar { | |
scrollbar-width: thin; | |
scrollbar-color: rgba(0, 0, 0, 0.5) transparent; | |
} | |
} | |
.pretty-scrollbar { | |
-ms-overflow-style: none; | |
} | |
.pretty-scrollbar::-webkit-scrollbar { | |
width: 0.75rem; | |
} | |
.pretty-scrollbar::-webkit-scrollbar-track { | |
background: transparent; | |
} | |
.pretty-scrollbar::-webkit-scrollbar-thumb { | |
background-color: rgba(0, 0, 0, 0.5); /* Adjust scrollbar color */ | |
border-radius: 20px; /* Adjust scrollbar border radius */ | |
border: 3px solid transparent; /* Add space around the scrollbar */ | |
background-clip: content-box; /* Clip background to content box, not border box */ | |
} | |
.pretty-scrollbar::-webkit-scrollbar-thumb:hover { | |
background-color: rgba(0, 0, 0, 0.7); /* Adjust scrollbar color on hover */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment