Skip to content

Instantly share code, notes, and snippets.

@bencmbrook
Last active January 18, 2023 00:42
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 bencmbrook/fb560a1ea7002fa7bac51ea93366eeba to your computer and use it in GitHub Desktop.
Save bencmbrook/fb560a1ea7002fa7bac51ea93366eeba to your computer and use it in GitHub Desktop.
hover scroll
/*******************
* 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