From 6c9e11cf29102f8f22527de802a177d921051f8f Mon Sep 17 00:00:00 2001 From: Matteo Gaggiano Date: Fri, 8 Feb 2019 12:36:15 +0100 Subject: [PATCH] feat(theme): multiple values for nb-(except-)for-theme (#1218) Added mixins for both `nb-for-theme` and `nb-except-for-theme` to work with multiple theme names with same content style --- src/framework/theme/styles/_theming.scss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/framework/theme/styles/_theming.scss b/src/framework/theme/styles/_theming.scss index b7a34e574f..4c6c837384 100644 --- a/src/framework/theme/styles/_theming.scss +++ b/src/framework/theme/styles/_theming.scss @@ -144,6 +144,15 @@ $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) { @@ -151,6 +160,15 @@ $nb-themes-export: () !global; } } +// 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';