summaryrefslogtreecommitdiffstats
path: root/src/_core.vars.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/_core.vars.scss')
-rw-r--r--src/_core.vars.scss42
1 files changed, 15 insertions, 27 deletions
diff --git a/src/_core.vars.scss b/src/_core.vars.scss
index 3b23c32..83d3a6a 100644
--- a/src/_core.vars.scss
+++ b/src/_core.vars.scss
@@ -1,3 +1,5 @@
1// stylelint-disable scss/dollar-variable-pattern
2
1@use 'sass:map'; 3@use 'sass:map';
2@use 'sass:meta'; 4@use 'sass:meta';
3@use 'sass:list'; 5@use 'sass:list';
@@ -98,15 +100,15 @@ $key-focus--border-width: props.def(--key-focus--border-width, props.get($borde
98$key-focus--border-offset: props.def(--key-focus--border-offset, props.get($border-width--medium)) !default; 100$key-focus--border-offset: props.def(--key-focus--border-offset, props.get($border-width--medium)) !default;
99 101
100$list--indent: props.def(--list--indent, props.get($size--400)) !default; 102$list--indent: props.def(--list--indent, props.get($size--400)) !default;
101$list--compact-indent: props.def(--list--indent, props.get($size--250)) !default; 103$list--compact-indent: props.def(--list--compact-indent, props.get($size--250)) !default;
102 104
103// 105//
104 106
105$static-colors: props.def(--static-colors); 107$-static-colors: ();
106 108
107@each $palette-name, $palette in map.get(config.$static-colors, --palettes) { 109@each $palette-name, $palette in map.get(config.$static-colors, --palettes) {
108 $palette: fn.palette($palette, map.get(config.$static-colors, --contrasts), 1, map.get(config.$static-colors, --base)); 110 $palette: fn.palette($palette, map.get(config.$static-colors, --contrasts), 1, map.get(config.$static-colors, --base));
109 $static-colors: props.merge($static-colors, ( $palette-name: $palette )); 111 $-static-colors: map.merge($-static-colors, ( $palette-name: $palette ));
110} 112}
111 113
112// 114//
@@ -129,6 +131,10 @@ $themes: ();
129 @each $variant-name, $variant in $theme { 131 @each $variant-name, $variant in $theme {
130 $compiled: props.def(--colors); 132 $compiled: props.def(--colors);
131 133
134 @each $palette-name, $palette in $-static-colors {
135 $compiled: props.merge($compiled, ( #{$palette-name}-static: $palette ));
136 }
137
132 @each $palette-name, $palette in map.get($variant, --palettes) { 138 @each $palette-name, $palette in map.get($variant, --palettes) {
133 $base-color: list.nth($palette, 1); 139 $base-color: list.nth($palette, 1);
134 $contrasts: list.nth($palette, 2); 140 $contrasts: list.nth($palette, 2);
@@ -147,32 +153,14 @@ $themes: ();
147 153
148 @if meta.type-of($ref) == 'map' { 154 @if meta.type-of($ref) == 'map' {
149 @each $key, $r in $ref { 155 @each $key, $r in $ref {
150 $repo-name: list.nth($r, 1); 156 $re1: list.nth($r, 1);
151 $re1: list.nth($r, 2); 157 $re2: iro.fn-list-slice($r, 2);
152 $re2: iro.fn-list-slice($r, 3); 158 $res: map.merge($res, ($key: props.get($compiled, $re1, $re2...)));
153
154 $res2: null;
155
156 @if $repo-name == --static {
157 $res2: props.get($static-colors, $re1, $re2...);
158 } @else {
159 $res2: props.get($compiled, $re1, $re2...);
160 }
161
162 $res: map.merge($res, ($key: $res2));
163 } 159 }
164 } @else { 160 } @else {
165 $repo-name: list.nth($ref, 1); 161 $ref1: list.nth($ref, 1);
166 $ref1: list.nth($ref, 2); 162 $ref2: iro.fn-list-slice($ref, 2);
167 $ref2: iro.fn-list-slice($ref, 3); 163 $res: props.get($compiled, $ref1, $ref2...);
168
169 $res: null;
170
171 @if $repo-name == --static {
172 $res: props.get($static-colors, $ref1, $ref2...);
173 } @else {
174 $res: props.get($compiled, $ref1, $ref2...);
175 }
176 } 164 }
177 165
178 $compiled: props.merge($compiled, ( $color: $res )); 166 $compiled: props.merge($compiled, ( $color: $res ));