Moved scrollbar styles to a mixin

This commit is contained in:
Samuel Elliott 2018-02-05 01:13:11 +00:00
parent 4c414e80d4
commit 64dd9cd6fb
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
5 changed files with 30 additions and 48 deletions

View File

@ -78,29 +78,6 @@
} }
} }
&::-webkit-scrollbar { @include scrollbar;
width: 14px;
}
&::-webkit-scrollbar-thumb {
background-color: #1e2124;
border-color: #36393e;
border-color: transparent;
}
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track-piece {
background-clip: padding-box;
border-width: 3px;
border-style: solid;
border-radius: 7px;
border-color: transparent;
}
&::-webkit-scrollbar-track-piece {
background-color: #2f3136;
border-color: #36393e;
border-color: transparent;
}
} }
} }

View File

@ -11,30 +11,7 @@
padding: 10px 10px 10px 0; padding: 10px 10px 10px 0;
margin: 10px 0; margin: 10px 0;
&::-webkit-scrollbar { @include scrollbar;
width: 14px;
}
&::-webkit-scrollbar-thumb {
background-color: #1e2124;
border-color: #36393e;
border-color: transparent;
}
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track-piece {
background-clip: padding-box;
border-width: 3px;
border-style: solid;
border-radius: 7px;
border-color: transparent;
}
&::-webkit-scrollbar-track-piece {
background-color: #2f3136;
border-color: #36393e;
border-color: transparent;
}
} }
&.bd-dark { &.bd-dark {

View File

@ -1,4 +1,5 @@
@import './variables/index.scss'; @import './variables/index.scss';
@import './mixins/index.scss';
@import './animations.scss'; @import './animations.scss';
@import './layouts.scss'; @import './layouts.scss';

View File

@ -0,0 +1 @@
@import './scrollbar.scss';

View File

@ -0,0 +1,26 @@
@mixin scrollbar {
&::-webkit-scrollbar {
width: 14px;
}
&::-webkit-scrollbar-thumb {
background-color: #1e2124;
border-color: #36393e;
border-color: transparent;
}
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track-piece {
background-clip: padding-box;
border-width: 3px;
border-style: solid;
border-radius: 7px;
border-color: transparent;
}
&::-webkit-scrollbar-track-piece {
background-color: #2f3136;
border-color: #36393e;
border-color: transparent;
}
}