Slim Custom Scrollbar
Replaces the default browser scrollbar with a thinner one in your brand colors on desktop browsers.
Opens WPIDE on
Code
html {
scrollbar-width: thin;
scrollbar-color: #2271b1 #f0f0f1;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: #f0f0f1;
}
::-webkit-scrollbar-thumb {
background: #2271b1;
border-radius: 10px;
border: 2px solid #f0f0f1;
}
Notes
Mobile browsers keep their native overlay scrollbars.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.