Tyrel's Blog

Code, Flying, Tech, Automation

Oct 13, 2022

Scrollbar Colors

Was talking to someone about CSS Nostalgia and "back in my day" when scrollbar colors came up.

/* For Chromium based browsers */
::-webkit-scrollbar {
  background: #2A365F;
}
::-webkit-scrollbar-thumb {
  background: #514763;
}

/* For Firefox */
html {
  scrollbar-color: #514763 #2A365F;
}

Firefox and Chrome have different selectors, so in order to support the majority of browsers, you need both.

Chrome with a blue/purple scrollbar

Chrome with a blue/purple scrollbar

Safari with a blue/purple scrollbar

Safari with a blue/purple scrollbar

Firefox with a blue/purple scrollbar

Firefox with a blue/purple scrollbar

 · · ·  css