-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathselect.fluent.scss
More file actions
83 lines (67 loc) · 2.1 KB
/
select.fluent.scss
File metadata and controls
83 lines (67 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@use 'styles/utilities' as *;
@use '../light/themes' as *;
@use 'components/dropdown/themes/light/themes' as dropdown-theme;
@use 'components/input/themes/light/themes' as input-theme;
$theme: $fluent;
$dropdown-theme: dropdown-theme.$fluent;
$input-theme: input-theme.$fluent;
:host {
--component-size: var(--ig-size, #{var-get($theme, 'default-size')});
--select-size: var(--component-size);
--dropdown-size: var(--component-size);
::part(helper-text) {
@include type-style('caption');
color: var-get($theme, 'helper-text-color');
margin-block-start: rem(5px);
grid-auto-rows: minmax(rem(18px), auto);
}
}
[part='base'] {
box-shadow: var(--ig-elevation-4);
}
[part~='toggle-icon'] {
background: var-get($theme, 'toggle-button-background');
color: var-get($theme, 'toggle-button-foreground');
igc-icon {
color: inherit;
}
}
:host(:focus-within) {
[part~='toggle-icon'] {
background: var-get($theme, 'toggle-button-background-focus');
}
}
:host(:not([invalid]):focus-within) {
igc-input[readonly]:not([disabled])::part(container) {
&::before {
box-shadow: inset 0 0 0 calc((var(--input-border-size) + #{rem(1px)})) var-get($input-theme, 'focused-border-color');
}
}
}
:host([invalid]) {
igc-input[readonly]:not([disabled])::part(container) {
&::before {
box-shadow: inset 0 0 0 var(--input-border-size) var-get($theme, 'error-secondary-color');
}
}
}
:host([invalid]:focus-within) {
igc-input[readonly]:not([disabled])::part(container) {
&::before {
box-shadow: inset 0 0 0 calc((var(--input-border-size) + #{rem(1px)})) var-get($input-theme, 'error-secondary-color');
}
}
}
:host(:disabled),
:host([disabled]) {
igc-validator {
color: var-get($fluent, 'disabled-text-color');
}
[part~='toggle-icon'] {
background: var-get($theme, 'toggle-button-background-disabled');
color: var-get($theme, 'toggle-button-foreground-disabled');
igc-icon {
color: inherit;
}
}
}