Skip to content

Commit

Permalink
fix(theme): correct custom properties subtraction (#2932)
Browse files Browse the repository at this point in the history
  • Loading branch information
katebatura authored Nov 5, 2021
1 parent a1c53d3 commit 4e63abc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
*/

@mixin nb-sidebar-theme() {

nb-sidebar {

background-color: nb-theme(sidebar-background-color);
box-shadow: nb-theme(sidebar-shadow);
color: nb-theme(sidebar-text-color);
Expand All @@ -33,9 +31,10 @@
}

@include nb-scrollbars(
nb-theme(sidebar-scrollbar-color),
nb-theme(sidebar-scrollbar-background-color),
nb-theme(sidebar-scrollbar-width));
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 All @@ -52,7 +51,8 @@
overflow: hidden;
}

nb-sidebar-header, nb-sidebar-footer {
nb-sidebar-header,
nb-sidebar-footer {
width: 0;
padding: 0;
overflow: hidden;
Expand Down Expand Up @@ -84,7 +84,9 @@
}

> .menu-items > .menu-item > a {
span, nb-badge, .expand-state {
span,
nb-badge,
.expand-state {
display: none;
}
}
Expand Down Expand Up @@ -112,7 +114,6 @@
display: none;
}
}

}
// we need to pull the content
&.left.fixed ~ .content {
Expand All @@ -139,7 +140,7 @@
}

&.fixed.end ~ .content {
@include nb-ltr(margin-right,nb-theme(sidebar-width-compact));
@include nb-ltr(margin-right, nb-theme(sidebar-width-compact));
@include nb-rtl(margin-left, nb-theme(sidebar-width-compact));
}

Expand Down Expand Up @@ -182,7 +183,7 @@
}

nb-menu {
margin: 0 -#{nb-theme(sidebar-padding)} -#{nb-theme(sidebar-padding)};
margin: 0 calc(#{nb-theme(sidebar-padding)} * -1) calc(#{nb-theme(sidebar-padding)} * -1);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@
}

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

&.supports-scrollbar-theming {
.values-list:hover .list-item:not(.am-pm-item) {
@include nb-ltr(margin-right, -#{nb-theme(timepicker-scrollbar-width)});
@include nb-rtl(margin-left, -#{nb-theme(timepicker-scrollbar-width)});
@include nb-ltr(margin-right, calc(#{nb-theme(timepicker-scrollbar-width)} * -1));
@include nb-rtl(margin-left, calc(#{nb-theme(timepicker-scrollbar-width)} * -1));
}
}

Expand Down

0 comments on commit 4e63abc

Please sign in to comment.