|
17 | 17 | @use '../../utilities/component-reset'; |
18 | 18 | @use '../../utilities/convert'; |
19 | 19 | @use '../../utilities/focus-outline' as *; |
| 20 | +@use '../../utilities/layout'; |
20 | 21 | @use '../../utilities/skeleton' as *; |
21 | 22 |
|
22 | 23 | /// Select styles |
|
25 | 26 | @mixin select { |
26 | 27 | .#{$prefix}--select { |
27 | 28 | @include component-reset.reset; |
| 29 | + @include layout.use('size', $default: 'md', $min: 'xs', $max: 'lg'); |
28 | 30 |
|
29 | 31 | position: relative; |
30 | 32 | display: flex; |
|
43 | 45 | .#{$prefix}--select-input { |
44 | 46 | @include type-style('body-compact-01'); |
45 | 47 | @include focus-outline('reset'); |
| 48 | + @include layout.use('size', $default: 'md', $min: 'xs', $max: 'lg'); |
| 49 | + @include layout.use('density', $default: 'normal'); |
46 | 50 |
|
47 | 51 | display: block; |
48 | 52 | border: none; |
49 | 53 | border-radius: 0; |
50 | 54 | appearance: none; |
51 | 55 | background-color: $field; |
52 | | - block-size: convert.to-rem(40px); |
| 56 | + block-size: layout.size('height'); |
53 | 57 | border-block-end: 1px solid $border-strong; |
54 | 58 | color: $text-primary; |
55 | 59 | cursor: pointer; |
|
102 | 106 | } |
103 | 107 | } |
104 | 108 |
|
105 | | - .#{$prefix}--select-input--sm { |
106 | | - block-size: convert.to-rem(32px); |
107 | | - max-block-size: convert.to-rem(32px); |
108 | | - } |
109 | | - |
110 | | - .#{$prefix}--select-input--lg { |
111 | | - block-size: convert.to-rem(48px); |
112 | | - max-block-size: convert.to-rem(48px); |
113 | | - } |
114 | | - |
115 | 109 | .#{$prefix}--select--disabled .#{$prefix}--label, |
116 | 110 | .#{$prefix}--select--disabled .#{$prefix}--form__helper-text { |
117 | 111 | color: $text-disabled; |
|
370 | 364 | inset-inline-end: -($divider-width); |
371 | 365 | } |
372 | 366 |
|
| 367 | + .#{$prefix}--select--decorator |
| 368 | + .#{$prefix}--select-input__wrapper |
| 369 | + .#{$prefix}--select-input |
| 370 | + ~ .#{$prefix}--select__invalid-icon, |
| 371 | + .#{$prefix}--select--slug |
| 372 | + .#{$prefix}--select-input__wrapper[data-invalid] |
| 373 | + .#{$prefix}--select-input |
| 374 | + ~ .#{$prefix}--select__invalid-icon, |
| 375 | + .#{$prefix}--select--slug |
| 376 | + .#{$prefix}--select-input__wrapper |
| 377 | + .#{$prefix}--select-input |
| 378 | + ~ .#{$prefix}--select__invalid-icon { |
| 379 | + inset-inline-end: $spacing-11; |
| 380 | + } |
| 381 | + |
373 | 382 | .#{$prefix}--select--decorator |
374 | 383 | .#{$prefix}--select-input:has( |
375 | 384 | ~ .#{$prefix}--select__inner-wrapper--decorator |
|
421 | 430 | .#{$prefix}--slug::before { |
422 | 431 | display: block; |
423 | 432 | } |
424 | | - |
425 | | - .#{$prefix}--select--decorator |
426 | | - .#{$prefix}--select-input__wrapper |
427 | | - .#{$prefix}--select-input |
428 | | - ~ .#{$prefix}--select__invalid-icon, |
429 | | - .#{$prefix}--select--slug |
430 | | - .#{$prefix}--select-input__wrapper[data-invalid] |
431 | | - .#{$prefix}--select-input |
432 | | - ~ .#{$prefix}--select__invalid-icon, |
433 | | - .#{$prefix}--select--slug |
434 | | - .#{$prefix}--select-input__wrapper |
435 | | - .#{$prefix}--select-input |
436 | | - ~ .#{$prefix}--select__invalid-icon { |
437 | | - inset-inline-end: $spacing-11; |
438 | | - } |
439 | 433 | } |
0 commit comments