Created
June 23, 2021 23:13
-
-
Save jaydodge1975/316a14f4f7615d3b0b401714ee4090c9 to your computer and use it in GitHub Desktop.
Color scrollbar 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: 1rem; | |
} | |
::-webkit-scrollbar-corner, | |
::-webkit-scrollbar-track { | |
background: #333333; | |
} | |
::-webkit-scrollbar-thumb { | |
background: #575757; | |
background-clip: padding-box; | |
border: 3px solid transparent; | |
} | |
::-webkit-scrollbar-thumb:hover { | |
background: #575757; | |
} | |
::-webkit-scrollbar-thumb:active { | |
background-color: #636363; | |
} | |
::-webkit-scrollbar-button:single-button { | |
background-color: #333333; | |
display: block; | |
background-size: 10px; | |
background-repeat: no-repeat; | |
} | |
::-webkit-scrollbar-button:single-button:active { | |
background-color: #575757; | |
} | |
::-webkit-scrollbar-button:single-button:vertical:decrement { | |
height: 12px; | |
width: 16px; | |
background-position: center 4px; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='50,00 0,50 100,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:vertical:decrement:hover { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='50,00 0,50 100,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:vertical:decrement:active { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='50,00 0,50 100,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:vertical:increment { | |
height: 12px; | |
width: 16px; | |
background-position: center 2px; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='0,0 100,0 50,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:vertical:increment:hover { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='0,0 100,0 50,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:vertical:increment:active { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='0,0 100,0 50,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:horizontal:decrement { | |
height: 12px; | |
width: 12px; | |
background-position: 3px 3px; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='0,50 50,100 50,0'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:horizontal:decrement:hover { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='0,50 50,100 50,0'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:horizontal:decrement:active { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='0,50 50,100 50,0'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:horizontal:increment { | |
height: 12px; | |
width: 12px; | |
background-position: 3px 3px; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(96, 96, 96)'><polygon points='0,0 0,100 50,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:horizontal:increment:hover { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(112, 112, 112)'><polygon points='0,0 0,100 50,50'/></svg>"); | |
} | |
::-webkit-scrollbar-button:single-button:horizontal:increment:active { | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='rgb(128, 128, 128)'><polygon points='0,0 0,100 50,50'/></svg>"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment