You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
mixin nb-for-theme() does not apply rules putted in when $nb-enable-css-custom-properties: true
Expected behavior:
mixin nb-for-theme() should work for both modes (css-props/scss-vars)
Steps to reproduce:
make sure that $nb-enable-css-custom-properties: true
use nb-for-theme() properly by passing one of registered theme name as $name argument and put some rules into body of the mixin to be applied just for this theme
include the code described above into body of nb-install() to apply it within theme installation process
Related code:
nb-for-theme() relies on theming-variables.$nb-theme-name to understand when exactly need to apply rules
sets process-context by including nb-pre-process-context($theme-name) theming-variables.$nb-theme-name: $theme-name line is important because here context is setting and then reading in @if (theming-variables.$nb-theme-name == $name) within nb-for-theme() when my rules is projected into @content under .nb-theme-#{$theme-name} (step above)
projects my rules into @content but process-context is not set (theming-variables.$nb-theme-name is empty) so when @if (theming-variables.$nb-theme-name == $name) checks within nb-for-theme() it gets '' and rules is not applied
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
mixin
nb-for-theme()
does not apply rules putted in when$nb-enable-css-custom-properties: true
Expected behavior:
mixin
nb-for-theme()
should work for both modes (css-props/scss-vars)Steps to reproduce:
$nb-enable-css-custom-properties: true
nb-for-theme()
properly by passing one of registered theme name as$name
argument and put some rules into body of the mixin to be applied just for this themenb-install()
to apply it within theme installation processRelated code:
nb-for-theme()
relies ontheming-variables.$nb-theme-name
to understand when exactly need to apply rulesLets start step-by-step:
my root file where installation process runs
includes
nb-install-global-with-css-props()
ornb-install-global-with-scss-vars()
bytheming-variables.$nb-enable-css-custom-properties
1.
$nb-enable-css-custom-properties: false
(scss-vars)creates specific host
.nb-theme-#{$theme-name}
for each registered theme and puts rules under it.sets process-context by including
nb-pre-process-context($theme-name)
theming-variables.$nb-theme-name: $theme-name
line is important because here context is setting and then reading in@if (theming-variables.$nb-theme-name == $name)
withinnb-for-theme()
when my rules is projected into@content
under.nb-theme-#{$theme-name}
(step above)2.
$nb-enable-css-custom-properties: true
(css-props)projects my rules into
@content
but process-context is not set (theming-variables.$nb-theme-name is empty) so when@if (theming-variables.$nb-theme-name == $name)
checks withinnb-for-theme()
it gets''
and rules is not appliedThe text was updated successfully, but these errors were encountered: