Skip to content

Instantly share code, notes, and snippets.

@Cifro
Created December 29, 2011 17:23
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Cifro/1535091 to your computer and use it in GitHub Desktop.
Save Cifro/1535091 to your computer and use it in GitHub Desktop.
New Gmail scrollbars for webkit browsers
/*
http://www.webkit.org/blog/363/styling-scrollbars/
*/
.zF.e-Rb::-webkit-scrollbar {
width: 12px
}
.zF.e-Rb::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
.zF.e-Rb::-webkit-scrollbar-track {
border-width: 0
}
.e-Rb::-webkit-scrollbar {
height: 16px;
overflow: visible;
width: 16px;
}
.e-Rb::-webkit-scrollbar-button {
height: 0;
width: 0;
}
.e-Rb::-webkit-scrollbar-track {
background-clip: padding-box;
border: solid transparent;
border-width: 0 0 0 4px;
}
.e-Rb::-webkit-scrollbar-track:horizontal {
border-width: 4px 0 0
}
.e-Rb::-webkit-scrollbar-track:hover {
background-color: rgba(0,0,0,.05);
box-shadow: inset 1px 0 0 rgba(0,0,0,.1);
}
.e-Rb::-webkit-scrollbar-track:horizontal:hover {
box-shadow: inset 0 1px 0 rgba(0,0,0,.1)
}
.e-Rb::-webkit-scrollbar-track:active {
background-color: rgba(0,0,0,.05);
box-shadow: inset 1px 0 0 rgba(0,0,0,.14),inset -1px 0 0 rgba(0,0,0,.07);
}
.e-Rb::-webkit-scrollbar-track:horizontal:active {
box-shadow: inset 0 1px 0 rgba(0,0,0,.14),inset 0 -1px 0 rgba(0,0,0,.07)
}
.e-Rb::-webkit-scrollbar-thumb {
background-color: rgba(0,0,0,.2);
background-clip: padding-box;
border: solid transparent;
border-width: 1px 1px 1px 6px;
min-height: 28px;
padding: 100px 0 0;
box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07);
}
.e-Rb::-webkit-scrollbar-thumb:horizontal {
border-width: 6px 1px 1px;
padding: 0 0 0 100px;
box-shadow: inset 1px 1px 0 rgba(0,0,0,.1),inset -1px 0 0 rgba(0,0,0,.07);
}
.e-Rb::-webkit-scrollbar-thumb:hover {
background-color: rgba(0,0,0,.4);
box-shadow: inset 1px 1px 1px rgba(0,0,0,.25);
}
.e-Rb::-webkit-scrollbar-thumb:active {
background-color: rgba(0,0,0,0.5);
box-shadow: inset 1px 1px 3px rgba(0,0,0,0.35);
}
.e-Rb-xTH6G.e-Rb::-webkit-scrollbar-track {
border-width: 0 1px 0 6px
}
.e-Rb-xTH6G.e-Rb::-webkit-scrollbar-track:horizontal {
border-width: 6px 0 1px
}
.e-Rb-xTH6G.e-Rb::-webkit-scrollbar-track:hover {
background-color: rgba(0,0,0,.035);
box-shadow: inset 1px 1px 0 rgba(0,0,0,.14),inset -1px -1px 0 rgba(0,0,0,.07);
}
.e-Rb-xTH6G.e-Rb::-webkit-scrollbar-thumb {
border-width: 0 1px 0 6px
}
.e-Rb-xTH6G.e-Rb::-webkit-scrollbar-thumb:horizontal {
border-width: 6px 0 1px
}
.e-Rb::-webkit-scrollbar-corner {
background: transparent
}
body.e-Rb::-webkit-scrollbar-track-piece {
background-clip: padding-box;
background-color: #f5f5f5;
border: solid #fff;
border-width: 0 0 0 3px;
box-shadow: inset 1px 0 0 rgba(0,0,0,.14),inset -1px 0 0 rgba(0,0,0,.07);
}
body.e-Rb::-webkit-scrollbar-track-piece:horizontal {
border-width: 3px 0 0;
box-shadow: inset 0 1px 0 rgba(0,0,0,.14),inset 0 -1px 0 rgba(0,0,0,.07);
}
body.e-Rb::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 5px
}
body.e-Rb::-webkit-scrollbar-thumb:horizontal {
border-width: 5px 1px 1px
}
body.e-Rb::-webkit-scrollbar-corner {
background-clip: padding-box;
background-color: #f5f5f5;
border: solid #fff;
border-width: 3px 0 0 3px;
box-shadow: inset 1px 1px 0 rgba(0,0,0,.14);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment