diff options
Diffstat (limited to 'src/_core.vars.scss')
-rw-r--r-- | src/_core.vars.scss | 93 |
1 files changed, 50 insertions, 43 deletions
diff --git a/src/_core.vars.scss b/src/_core.vars.scss index 0a94534..f7a9ebc 100644 --- a/src/_core.vars.scss +++ b/src/_core.vars.scss | |||
@@ -89,11 +89,18 @@ $border-width--thick: props.def(--border-width--thick, 4px) !default; | |||
89 | $border-width--medium: props.def(--border-width--medium, 2px) !default; | 89 | $border-width--medium: props.def(--border-width--medium, 2px) !default; |
90 | $border-width--thin: props.def(--border-width--thin, 1px) !default; | 90 | $border-width--thin: props.def(--border-width--thin, 1px) !default; |
91 | 91 | ||
92 | $shadow--x: props.def(--shadow--x, 0) !default; | 92 | $shadow--l1--x: props.def(--shadow--l1--x, 0) !default; |
93 | $shadow--y: props.def(--shadow--y, 1px) !default; | 93 | $shadow--l1--y: props.def(--shadow--l1--y, 2px) !default; |
94 | $shadow--blur: props.def(--shadow--blur, 4px) !default; | 94 | $shadow--l1--blur: props.def(--shadow--l1--blur, 3px) !default; |
95 | $shadow--l1--grow: props.def(--shadow--l1--grow, -1px) !default; | ||
95 | 96 | ||
96 | $rounding: props.def(--rounding, 4px) !default; | 97 | $shadow--l2--x: props.def(--shadow--l2--x, 0) !default; |
98 | $shadow--l2--y: props.def(--shadow--l2--y, 5px) !default; | ||
99 | $shadow--l2--blur: props.def(--shadow--l2--blur, 12px) !default; | ||
100 | $shadow--l2--grow: props.def(--shadow--l2--grow, -4px) !default; | ||
101 | |||
102 | $rounding: props.def(--rounding, 12px) !default; | ||
103 | $rounding--sm: props.def(--rounding--sm, 4px) !default; | ||
97 | 104 | ||
98 | $key-focus--outline-width: props.def(--key-focus--outline-width, props.get($border-width--thick)) !default; | 105 | $key-focus--outline-width: props.def(--key-focus--outline-width, props.get($border-width--thick)) !default; |
99 | $key-focus--border-width: props.def(--key-focus--border-width, props.get($border-width--medium)) !default; | 106 | $key-focus--border-width: props.def(--key-focus--border-width, props.get($border-width--medium)) !default; |
@@ -109,8 +116,8 @@ $sticky-top-offset: props.def(--sticky-top-offset, 0rem) !default; | |||
109 | $-static-colors: (); | 116 | $-static-colors: (); |
110 | 117 | ||
111 | @each $palette-name, $palette in map.get(config.$static-colors, --palettes) { | 118 | @each $palette-name, $palette in map.get(config.$static-colors, --palettes) { |
112 | $palette: fn.palette($palette, map.get(config.$static-colors, --levels), map.get(config.$static-colors, --base)); | 119 | $palette: fn.palette($palette, map.get(config.$static-colors, --levels), map.get(config.$static-colors, --base)); |
113 | $-static-colors: map.merge($-static-colors, ( $palette-name: $palette )); | 120 | $-static-colors: map.merge($-static-colors, ( $palette-name: $palette )); |
114 | } | 121 | } |
115 | 122 | ||
116 | // | 123 | // |
@@ -118,11 +125,11 @@ $-static-colors: (); | |||
118 | $transparent-colors: props.def(--transparent-colors, (), 'color'); | 125 | $transparent-colors: props.def(--transparent-colors, (), 'color'); |
119 | 126 | ||
120 | @each $palette-name, $palette in (--black: #000 #fff, --white: #fff #000) { | 127 | @each $palette-name, $palette in (--black: #000 #fff, --white: #fff #000) { |
121 | $color: list.nth($palette, 1); | 128 | $color: list.nth($palette, 1); |
122 | $text: list.nth($palette, 2); | 129 | $text: list.nth($palette, 2); |
123 | 130 | ||
124 | $palette: fn.transparent-palette($color, $text, map.get(config.$static-colors, --transparents)); | 131 | $palette: fn.transparent-palette($color, $text, map.get(config.$static-colors, --transparents)); |
125 | $transparent-colors: props.merge($transparent-colors, ( $palette-name: $palette )); | 132 | $transparent-colors: props.merge($transparent-colors, ( $palette-name: $palette )); |
126 | } | 133 | } |
127 | 134 | ||
128 | // | 135 | // |
@@ -130,47 +137,47 @@ $transparent-colors: props.def(--transparent-colors, (), 'color'); | |||
130 | $themes: (); | 137 | $themes: (); |
131 | 138 | ||
132 | @each $theme-name, $theme in config.$themes { | 139 | @each $theme-name, $theme in config.$themes { |
133 | @each $variant-name, $variant in $theme { | 140 | @each $variant-name, $variant in $theme { |
134 | @if $variant != null { | 141 | @if $variant != null { |
135 | $compiled: props.def(--colors, (), 'color'); | 142 | $compiled: props.def(--colors, (), 'color'); |
136 | 143 | ||
137 | @each $palette-name, $palette in $-static-colors { | 144 | @each $palette-name, $palette in $-static-colors { |
138 | $compiled: props.merge($compiled, ( #{$palette-name}-static: $palette )); | 145 | $compiled: props.merge($compiled, ( #{$palette-name}-static: $palette )); |
139 | } | 146 | } |
140 | 147 | ||
141 | @each $palette-name, $palette in map.get($variant, --palettes) { | 148 | @each $palette-name, $palette in map.get($variant, --palettes) { |
142 | $base-color: list.nth($palette, 1); | 149 | $base-color: list.nth($palette, 1); |
143 | $levels: list.nth($palette, 2); | 150 | $levels: list.nth($palette, 2); |
144 | 151 | ||
145 | $palette: fn.palette($base-color, map.get($variant, --levels, $levels), list.nth(map.get($variant, --palettes, --base), 1)); | 152 | $palette: fn.palette($base-color, map.get($variant, --levels, $levels), list.nth(map.get($variant, --palettes, --base), 1)); |
146 | $compiled: props.merge($compiled, ( $palette-name: $palette )); | 153 | $compiled: props.merge($compiled, ( $palette-name: $palette )); |
147 | } | 154 | } |
148 | 155 | ||
149 | @each $color, $value in map.get($variant, --constants) { | 156 | @each $color, $value in map.get($variant, --constants) { |
150 | $compiled: props.merge($compiled, ( $color: $value )); | 157 | $compiled: props.merge($compiled, ( $color: $value )); |
151 | } | 158 | } |
152 | 159 | ||
153 | @each $color, $ref in map.get($variant, --semantic) { | 160 | @each $color, $ref in map.get($variant, --semantic) { |
154 | $res: (); | 161 | $res: (); |
155 | 162 | ||
156 | @if meta.type-of($ref) == 'map' { | 163 | @if meta.type-of($ref) == 'map' { |
157 | @each $key, $r in $ref { | 164 | @each $key, $r in $ref { |
158 | $re1: list.nth($r, 1); | 165 | $re1: list.nth($r, 1); |
159 | $re2: functions.list-slice($r, 2); | 166 | $re2: functions.list-slice($r, 2); |
160 | $res: map.merge($res, ($key: props.get($compiled, $re1, $re2...))); | 167 | $res: map.merge($res, ($key: props.get($compiled, $re1, $re2...))); |
161 | } | 168 | } |
162 | } @else { | 169 | } @else { |
163 | $ref1: list.nth($ref, 1); | 170 | $ref1: list.nth($ref, 1); |
164 | $ref2: functions.list-slice($ref, 2); | 171 | $ref2: functions.list-slice($ref, 2); |
165 | $res: props.get($compiled, $ref1, $ref2...); | 172 | $res: props.get($compiled, $ref1, $ref2...); |
166 | } | 173 | } |
167 | 174 | ||
168 | $compiled: props.merge($compiled, ( $color: $res )); | 175 | $compiled: props.merge($compiled, ( $color: $res )); |
169 | } | 176 | } |
170 | 177 | ||
171 | $themes: map.set($themes, $theme-name, $variant-name, $compiled); | 178 | $themes: map.set($themes, $theme-name, $variant-name, $compiled); |
172 | } | 179 | } |
173 | } | 180 | } |
174 | } | 181 | } |
175 | 182 | ||
176 | $theme: map.get($themes, config.$theme-default, light) !default; | 183 | $theme: map.get($themes, config.$theme-default, light) !default; |