|
6 | 6 |
|
7 | 7 | // Default: Dark theme |
8 | 8 | @mixin theme { |
| 9 | + color-scheme: dark; |
9 | 10 | #{$css-var-prefix}background-color: #{mix($slate-950, $slate-900)}; |
10 | 11 |
|
11 | 12 | // Text color |
|
123 | 124 | #{$css-var-prefix}form-element-valid-focus-color: var( |
124 | 125 | #{$css-var-prefix}form-element-valid-active-border-color |
125 | 126 | ); |
126 | | - |
127 | | - // Focus for buttons, radio and select |
128 | | - input:is( |
129 | | - [type="submit"], |
130 | | - [type="button"], |
131 | | - [type="reset"], |
132 | | - [type="checkbox"], |
133 | | - [type="radio"], |
134 | | - [type="file"] |
135 | | - ) { |
136 | | - #{$css-var-prefix}form-element-focus-color: var(#{$css-var-prefix}primary-focus); |
137 | | - } |
138 | 127 | } |
139 | 128 |
|
140 | 129 | // Switch (input[type="checkbox"][role="switch"]) |
|
201 | 190 | #{$css-var-prefix}tooltip-color: var(#{$css-var-prefix}contrast-inverse); |
202 | 191 | } |
203 | 192 |
|
| 193 | + // Form validation icons |
| 194 | + @if map.get($modules, "forms/basics") { |
| 195 | + #{$css-var-prefix}icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb(mix($jade-450, $slate-600))}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); |
| 196 | + #{$css-var-prefix}icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb(mix($red-500, $slate-600))}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E"); |
| 197 | + } |
| 198 | + |
| 199 | + // Focus for buttons, radio and select |
| 200 | + @if map.get($modules, "forms/basics") { |
| 201 | + input:is( |
| 202 | + [type="submit"], |
| 203 | + [type="button"], |
| 204 | + [type="reset"], |
| 205 | + [type="checkbox"], |
| 206 | + [type="radio"], |
| 207 | + [type="file"] |
| 208 | + ) { |
| 209 | + #{$css-var-prefix}form-element-focus-color: var(#{$css-var-prefix}primary-focus); |
| 210 | + } |
| 211 | + } |
| 212 | + |
204 | 213 | // Chevron icons |
205 | 214 | @if map.get($modules, "components/accordion") or map.get($modules, "components/dropdown") { |
206 | 215 | // Change the icon color to black for accordion and dropdown .contrast buttons |
|
217 | 226 | } |
218 | 227 | } |
219 | 228 |
|
220 | | - // Form validation icons |
221 | | - @if map.get($modules, "forms/basics") { |
222 | | - #{$css-var-prefix}icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb(mix($jade-450, $slate-600))}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); |
223 | | - #{$css-var-prefix}icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{functions.display-rgb(mix($red-500, $slate-600))}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E"); |
224 | | - } |
225 | | - |
226 | 229 | // Loading icon (animated) |
227 | 230 | @if map.get($modules, "components/loading") { |
228 | 231 | // Change the icon color to black for .contrast buttons |
|
242 | 245 | } |
243 | 246 | } |
244 | 247 | } |
245 | | - |
246 | | - // Document |
247 | | - color-scheme: dark; |
248 | 248 | } |
0 commit comments