Skip to content

Commit

Permalink
feat(theme): multiple values for nb-(except-)for-theme (#1218)
Browse files Browse the repository at this point in the history
Added mixins for both `nb-for-theme` and `nb-except-for-theme` to work with multiple theme names with same content style
  • Loading branch information
Matteo Gaggiano authored and nnixaa committed Feb 8, 2019
1 parent cea929d commit 6c9e11c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/framework/theme/styles/_theming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,31 @@ $nb-themes-export: () !global;
@content;
}
}

// Add content for theme into a list of themes
@mixin nb-for-themes($names...) {
@each $name in $names {
@include nb-for-theme($name) {
@content;
}
}
}

@mixin nb-except-theme($name) {
@if ($theme-name != $name) {
@content;
}
}

// Add content except for theme into a list of themes
@mixin nb-except-for-themes($names...) {
@each $name in $names {
@include nb-except-theme($name) {
@content;
}
}
}

// TODO: another mixing for the almost same thing
@mixin nb-install-root-component() {
@warn '`nb-install-root-component` is depricated, replace with `nb-install-component`, as `body` is root element now';
Expand Down

0 comments on commit 6c9e11c

Please sign in to comment.