Last active
January 18, 2023 00:42
-
-
Save bencmbrook/fb560a1ea7002fa7bac51ea93366eeba to your computer and use it in GitHub Desktop.
hover scroll
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
/******************* | |
* Scrollbar | |
*******************/ | |
/** Scrollbar style override */ | |
.scroller { | |
overflow-x: hidden; | |
overflow-y: scroll; | |
border-color: rgba(0, 0, 0, 0); | |
transition-timing-function: ease-in-out; | |
transition-duration: 200ms; | |
transition-property: border-color; | |
border-color: rgba(0, 0, 0, 0); | |
} | |
/** Scrollbar hover */ | |
.scroller:hover { | |
border-color: rgba(0, 0, 0, 0.15); | |
} | |
/** Scrollbar border */ | |
.scroller::-webkit-scrollbar, | |
.scroller::-webkit-scrollbar-thumb, | |
.scroller::-webkit-scrollbar-corner { | |
border-color: inherit; | |
border-right-width: calc(100vw + 100vh); | |
border-right-style: inset; | |
} | |
/** Scrollbar track */ | |
.scroller::-webkit-scrollbar { | |
width: 7px; | |
height: 7px; | |
border-color: rgba(0, 0, 0, 0); | |
} | |
/** Scrollbar thumb */ | |
.scroller::-webkit-scrollbar-thumb { | |
border-color: rgba(0, 0, 0, 0.1); | |
border-color: inherit; | |
border-radius: 100px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment