From cb1d13fa7a7f9038973ce9bc56063dc6fbcc568a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 23 Aug 2022 12:29:13 +0200 Subject: Exclude unused palettes --- assets/css/_apply-vars.scss | 36 ++++++++++++++++++++++++++++++++++++ assets/css/style.scss | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 assets/css/_apply-vars.scss (limited to 'assets/css') diff --git a/assets/css/_apply-vars.scss b/assets/css/_apply-vars.scss new file mode 100644 index 0000000..5e6e54f --- /dev/null +++ b/assets/css/_apply-vars.scss @@ -0,0 +1,36 @@ +@use 'iro-sass/src/index' as iro; +@use 'include-media/dist/include-media' as media; + +:root { + @include iro.props-assign('dims'); + + @each $breakpoint in map-keys(media.$breakpoints) { + @include media.media('<=#{$breakpoint}') { + @include iro.props-assign($breakpoint); + } + } + + @include iro.props-assign('colors'); + @include iro.props-assign('palette-light'); + + @media (prefers-color-scheme: dark) { + @include iro.props-assign('colors-dark'); + @include iro.props-assign('palette-dark'); + } +} + +@include iro.bem-theme('dark') { + @include iro.props-assign('colors'); + @include iro.props-assign('colors-dark'); + @include iro.props-assign('palette-dark'); +} + +@include iro.bem-theme('raised') { + @include iro.props-assign('colors'); + @include iro.props-assign('palette-light-hi'); + + @media (prefers-color-scheme: dark) { + @include iro.props-assign('colors-dark'); + @include iro.props-assign('palette-dark-lo'); + } +} diff --git a/assets/css/style.scss b/assets/css/style.scss index f7d3e6b..20bcc27 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -39,4 +39,4 @@ @use 'iro-design/src/utils'; -@use 'iro-design/src/apply-vars'; +@use 'apply-vars'; -- cgit v1.2.3-70-g09d2