Skip to content

Instantly share code, notes, and snippets.

@sidonaldson
Created April 25, 2016 15:31
Show Gist options
  • Save sidonaldson/52817a9312746ff180ce761942152828 to your computer and use it in GitHub Desktop.
Save sidonaldson/52817a9312746ff180ce761942152828 to your computer and use it in GitHub Desktop.
Force Scrollbars to appear (even with magic mouse)
div{
overflow-y: scroll;
}
div::-webkit-scrollbar {
width: 9px;
}
div::-webkit-scrollbar-track {
border-radius: 5px;
background: rgba(0,0,0,0.1);
}
div::-webkit-scrollbar-thumb {
border-radius: 5px;
background: rgba(0,0,0,0.2);
}
div::-webkit-scrollbar-thumb:hover {
background: rgba(0,0,0,0.4);
}
div::-webkit-scrollbar-thumb:window-inactive {
background: rgba(0,0,0,0.05);
}
.forceScrollBars{
overflow-y: scroll;
&::-webkit-scrollbar {
width: 9px;
}
&::-webkit-scrollbar-track {
border-radius: 5px;
background: rgba(0, 0, 0, 0.1);
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
background: rgba(0, 0, 0, 0.2);
}
&::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.4);
}
&::-webkit-scrollbar-thumb:window-inactive {
background: rgba(0, 0, 0, 0.05);
}
}
.forceScrollBars()
overflow-y scroll
&::-webkit-scrollbar
width 9px
&::-webkit-scrollbar-track
border-radius 5px
background rgba(0, 0, 0, 0.1)
&::-webkit-scrollbar-thumb
border-radius 5px
background rgba(0, 0, 0, 0.2)
&::-webkit-scrollbar-thumb:hover
background rgba(0, 0, 0, 0.4)
&::-webkit-scrollbar-thumb:window-inactive
background rgba(0, 0, 0, 0.05)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment