Skip to content

Instantly share code, notes, and snippets.

@fabriciobastian
Created November 15, 2019 10:08
Show Gist options
  • Save fabriciobastian/8d9998dc53c8f1712988da34196ee203 to your computer and use it in GitHub Desktop.
Save fabriciobastian/8d9998dc53c8f1712988da34196ee203 to your computer and use it in GitHub Desktop.
Scrollbar styling
@mixin scrollbar-mixin() {
.mat-sidenav-content,
.mat-sidenav {
overflow-y: overlay !important;
}
.mat-sidenav-content:hover::-webkit-scrollbar,
.mat-sidenav:hover::-webkit-scrollbar {
display: initial;
}
.mat-sidenav-content::-webkit-scrollbar,
.mat-sidenav::-webkit-scrollbar {
display: none;
}
/* hidden elements */
.mat-sidenav-content::-webkit-scrollbar-button,
.mat-sidenav-content::-webkit-scrollbar-track-piece,
.mat-sidenav-content::-webkit-scrollbar-corner,
.mat-sidenav-content::-webkit-resizer,
.mat-sidenav::-webkit-scrollbar-button,
.mat-sidenav::-webkit-scrollbar-track-piece,
.mat-sidenav::-webkit-scrollbar-corner,
.mat-sidenav::-webkit-resizer {
display: none;
}
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
background-color: #d8d8d8;
}
::-webkit-scrollbar-track {
border-radius: 0;
background-color: transparent;
}
::-webkit-scrollbar-corner {
background-color: #2a2a2a;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment