Created
July 20, 2020 08:49
-
-
Save burgalon/94344fa9fc84c178f1df94066f300345 to your computer and use it in GitHub Desktop.
Scrollable custom bar hiding Windows scrollbars and overlaying scrollbars on top
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
.scrollable-y-with-hide { | |
overflow-y: hidden; | |
&:hover { | |
overflow-y: auto; | |
// https://stackoverflow.com/a/54979559/375050 | |
// only for WebKit so that scrollbars do not take space and cause content to overflow | |
overflow-y: overlay; | |
} | |
&::-webkit-scrollbar-thumb { | |
background: hsla(0%, 0%, 0%, 0.4); | |
} | |
&::-webkit-scrollbar { | |
height: 8px; | |
width: 8px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment