Skip to content

Commit

Permalink
fix: scroll bar theming (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Oct 10, 2019
1 parent a678e60 commit e6b19a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

@mixin nb-layout-theme() {

nb-layout {
nb-layout .scrollable-container {
@include nb-scrollbars(
nb-theme(layout-scrollbar-color),
nb-theme(layout-scrollbar-background-color),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
line-height: nb-theme(sidebar-text-line-height);
width: nb-theme(sidebar-width);

@include nb-scrollbars(
nb-theme(sidebar-scrollbar-color),
nb-theme(sidebar-scrollbar-background-color),
nb-theme(sidebar-scrollbar-width));

.main-container {
height: nb-theme(sidebar-height);
width: nb-theme(sidebar-width);
Expand All @@ -36,6 +31,11 @@
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}

@include nb-scrollbars(
nb-theme(sidebar-scrollbar-color),
nb-theme(sidebar-scrollbar-background-color),
nb-theme(sidebar-scrollbar-width));
}

// TODO: width used to use transition on width
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
@mixin nb-tabset-theme() {

nb-tabset {
@include nb-scrollbars(
nb-theme(tabset-scrollbar-color),
nb-theme(tabset-scrollbar-background-color),
nb-theme(tabset-scrollbar-width));

background-color: nb-theme(tabset-background-color);
border-radius: nb-theme(tabset-border-radius);
box-shadow: nb-theme(tabset-shadow);
Expand Down Expand Up @@ -98,6 +93,11 @@
font-weight: nb-theme(tabset-content-text-font-weight);
line-height: nb-theme(tabset-content-text-line-height);
padding: nb-theme(tabset-content-padding);

@include nb-scrollbars(
nb-theme(tabset-scrollbar-color),
nb-theme(tabset-scrollbar-background-color),
nb-theme(tabset-scrollbar-width));
}
}
}
6 changes: 3 additions & 3 deletions src/framework/theme/styles/core/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
*/

@mixin nb-scrollbars($fg, $bg, $size, $border-radius: $size / 2) {
::-webkit-scrollbar {
&::-webkit-scrollbar {
width: $size;
height: $size;
}

::-webkit-scrollbar-thumb {
&::-webkit-scrollbar-thumb {
background: $fg;
cursor: pointer;
border-radius: $border-radius;
}

::-webkit-scrollbar-track {
&::-webkit-scrollbar-track {
background: $bg;
}

Expand Down

0 comments on commit e6b19a5

Please sign in to comment.