diff options
| author | Volpeon <git@volpeon.ink> | 2025-07-27 11:51:37 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2025-07-27 11:51:37 +0200 |
| commit | fe8b951c39a13e6bb83c7b46b4761c71761ff0d9 (patch) | |
| tree | a3995d3a61338bba9799cb0cb26bc6e685d36b34 /src | |
| parent | Add explicit dark theme (diff) | |
| download | iro-design-fe8b951c39a13e6bb83c7b46b4761c71761ff0d9.tar.gz iro-design-fe8b951c39a13e6bb83c7b46b4761c71761ff0d9.tar.bz2 iro-design-fe8b951c39a13e6bb83c7b46b4761c71761ff0d9.zip | |
Add option for explicit dark theme
Diffstat (limited to 'src')
| -rw-r--r-- | src/_config.scss | 2 | ||||
| -rw-r--r-- | src/_core.scss | 2 | ||||
| -rw-r--r-- | src/_props.scss | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/_config.scss b/src/_config.scss index 284d6e7..25c0adb 100644 --- a/src/_config.scss +++ b/src/_config.scss | |||
| @@ -25,3 +25,5 @@ $themes: map.deep-merge(( | |||
| 25 | ), $themes-override) !default; | 25 | ), $themes-override) !default; |
| 26 | 26 | ||
| 27 | $theme-default: list.nth(map.keys($themes), 1) !default; | 27 | $theme-default: list.nth(map.keys($themes), 1) !default; |
| 28 | |||
| 29 | $explicit-dark-theme: false !default; | ||
diff --git a/src/_core.scss b/src/_core.scss index 7c37518..2eb04fc 100644 --- a/src/_core.scss +++ b/src/_core.scss | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | } | 21 | } |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | @if map.has-key($theme, 'dark') { | 24 | @if map.has-key($theme, 'dark') and config.$explicit-dark-theme { |
| 25 | @include bem.theme('dark') { | 25 | @include bem.theme('dark') { |
| 26 | @include props.materialize(map.values(meta.module-variables('vars'))); | 26 | @include props.materialize(map.values(meta.module-variables('vars'))); |
| 27 | @include props.materialize(map.get($theme, 'dark')); | 27 | @include props.materialize(map.get($theme, 'dark')); |
diff --git a/src/_props.scss b/src/_props.scss index 138b564..5590aed 100644 --- a/src/_props.scss +++ b/src/_props.scss | |||
| @@ -27,9 +27,11 @@ | |||
| 27 | } | 27 | } |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | @include bem.theme('dark') { | 30 | @if config.$explicit-dark-theme { |
| 31 | @include props.materialize($ref, 'color'); | 31 | @include bem.theme('dark') { |
| 32 | @include props.materialize($ref, 'dark'); | 32 | @include props.materialize($ref, 'color'); |
| 33 | @include props.materialize($ref, 'dark'); | ||
| 34 | } | ||
| 33 | } | 35 | } |
| 34 | 36 | ||
| 35 | @each $theme-name in map.keys(config.$themes) { | 37 | @each $theme-name in map.keys(config.$themes) { |
