Last active
February 18, 2025 14:50
-
-
Save rlaphoenix/6dc78bfcbb0a44df2a1457a026dc046e to your computer and use it in GitHub Desktop.
Firefox-like Scrollbar for WebKit in CSS
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
::-webkit-scrollbar { | |
width: calc(16px - 2px - 1px); | |
height: calc(16px - 2px - 1px); | |
} | |
::-webkit-scrollbar-thumb { | |
background-color: rgba(128,128,128,0.75); | |
background-clip: padding-box; | |
border: 4px solid rgba(0, 0, 0, 0); | |
border-radius: 9999px; | |
display: none; | |
} | |
:hover::-webkit-scrollbar-thumb { | |
display: initial; | |
} | |
::-webkit-scrollbar-thumb:vertical:hover, | |
::-webkit-scrollbar-thumb:horizontal:hover { | |
background-clip: padding-box; | |
border-left: 0px; | |
} | |
::-webkit-scrollbar-thumb:vertical:active, | |
::-webkit-scrollbar-thumb:horizontal:active { | |
background-color: rgba(90,90,90,0.5); | |
background-clip: padding-box; | |
border: 4px solid rgba(0, 0, 0, 0); | |
border-left: 0px; | |
border-radius: 9999px; | |
} | |
::-webkit-scrollbar-track { | |
background-color: transparent; | |
} | |
::-webkit-scrollbar-track:hover { | |
background-color: rgba(0, 0, 0, 0.25); | |
} | |
::-webkit-scrollbar-corner { | |
background: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Differences to Firefox 135.0~:
Benefits of this CSS: