Custom Scrollbars Mixin

Scrollbars are one of those UI components that are present on almost every page of the internet, yet we (developers) have little to no control over it. Some browsers give us the ability to customize their appearance but for most …

Avatar of Kitty Giraudel
Kitty Giraudel on (Updated on )


A brief history of styling scrollbars:

  1. It used to be a thing only Internet Explorer could do (ancient versions) with stuff like -ms-scrollbar-base-color. These do not exist anymore.
  2. Then WebKit-based browser engines got on board with stuff like ::-webkit-scrollbar
Avatar of Sara Cope
Sara Cope on (Updated on )

Force Vertical Scrollbar

html {
  overflow-y: scroll;

This is invalid CSS, but it works in everything except Opera. The reason for this is to prevent “centering jumps” when navigating back and forth between pages with enough content to have a vertical scroll …

Avatar of Chris Coyier
Chris Coyier on (Updated on )