Skip to content

Commit cb28f57

Browse files
authored
fix: skip all dark theme styles when dark theme selector is set to false (#139)
1 parent 447d64c commit cb28f57

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

projects/material-css-vars/src/lib/_public-util.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@
139139
}
140140

141141
@mixin mat-css-dark-theme-global {
142-
#{variables.$dark-theme-selector} & {
143-
@content;
142+
@if variables.$dark-theme-selector {
143+
#{variables.$dark-theme-selector} & {
144+
@content;
145+
}
144146
}
145147
}
146148

@@ -155,8 +157,10 @@
155157
#{variables.$light-theme-selector} & {
156158
@content;
157159
}
158-
#{variables.$dark-theme-selector} & {
159-
@content;
160+
@if variables.$dark-theme-selector {
161+
#{variables.$dark-theme-selector} & {
162+
@content;
163+
}
160164
}
161165
}
162166

0 commit comments

Comments
 (0)