Skip to content

Commit 7d506f8

Browse files
committed
feat: support theme+theme unions
1 parent 68bf412 commit 7d506f8

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

packages/styles/src/utils/_mixins.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,23 @@
249249
}
250250
}
251251

252-
// light & dark
252+
// theme color - theme color
253+
@each $theme1, $theme1-value in variables.$theme-colors {
254+
@each $theme2, $theme2-value in variables.$theme-colors {
255+
@if $theme1 != $theme2 {
256+
&.#{variables.$prefix-default}--tm-#{$theme1}-#{$theme2} {
257+
@content ($theme1, $theme1-value, $theme2, $theme2-value, false);
258+
}
259+
}
260+
}
261+
}
262+
263+
// light - dark
253264
&.#{variables.$prefix-default}--tm-light-dark {
254265
@content (light, variables.$color-light, dark, variables.$color-dark, false);
255266
}
256267

257-
// dark & light
268+
// dark - light
258269
&.#{variables.$prefix-default}--tm-dark-light {
259270
@content (dark, variables.$color-dark, light, variables.$color-light, false);
260271
}

0 commit comments

Comments
 (0)