Created
September 7, 2018 09:56
-
-
Save chukonu/89d143d1f2b7d4b1ddc80e942a7cbd3a to your computer and use it in GitHub Desktop.
Google Docs-style scrollbar
This file contains hidden or 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
// Override webkit browsers' default scrollbar styles | |
::-webkit-scrollbar { | |
width: 12px; | |
height: 12px; | |
} | |
::-webkit-scrollbar-button { | |
height: 0; | |
width: 0; | |
} | |
::-webkit-scrollbar-track-piece { | |
background-clip: padding-box; | |
background-color: #f5f5f5; | |
border: solid #fff; | |
border-width: 0; | |
box-shadow: inset 1px 0 0 rgba(0,0,0,.14), inset -1px 0 0 rgba(0,0,0,.07); | |
} | |
::-webkit-scrollbar-thumb { | |
background-color: rgba(0, 0, 0, .2); | |
background-clip: padding-box; | |
border: solid transparent; | |
border-width: 0; | |
min-height: 28px; | |
padding: 100px 0 0; | |
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset 0 -1px 0 rgba(0, 0, 0, .07); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment