-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcombo.fluent.scss
More file actions
124 lines (101 loc) · 3.18 KB
/
combo.fluent.scss
File metadata and controls
124 lines (101 loc) · 3.18 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
@use 'styles/utilities' as *;
@use '../light/themes' as *;
@use 'components/dropdown/themes/light/themes' as dropdown-theme;
$theme: $fluent;
$dropdown-theme: dropdown-theme.$fluent;
:host {
--component-size: var(--ig-size, #{var-get($theme, 'default-size')});
--combo-size: var(--component-size);
::part(helper-text) {
margin-block-start: pad-block(rem(5px));
grid-auto-rows: minmax(rem(18px), auto);
}
}
[part='filter-input'] {
padding: pad(rem(2px), rem(4px), rem(8px));
}
[part='list-wrapper'] {
background: var-get($dropdown-theme, 'background-color');
border-radius: var-get($dropdown-theme, 'border-radius');
igc-input::part(container) {
background: transparent;
border-radius: 0;
border-inline: 0;
border-block-start: 0;
&::before {
inset-inline-start: 0;
width: calc(100% - var(--input-border-size));
// The shadow color is set by the color: prop set on the input-group [part=container]::before element
// Here we only change the shadow to look like border bottom
box-shadow: inset 0 calc(var(--input-border-size) * -1) 0 0;
border-radius: 0;
}
}
igc-input:focus-within::part(container) {
&::before {
// The shadow color is set by the color: prop set on the input-group [part=container]::before element
// Here we only change the shadow to look like border bottom
box-shadow: inset 0 calc((var(--input-border-size) + #{rem(1px)}) * -1) 0 0;
}
}
igc-input::part(start) {
display: none;
}
igc-input::part(input) {
border-radius: 0;
padding: 0;
border-inline-start: 0;
border-inline-end-color: transparent;
border-block-start: 0;
box-shadow: none;
height: var(--size);
&::selection {
background: color(primary, 100);
}
}
igc-input::part(suffix) {
background: transparent;
}
}
[part='empty'] {
color: var-get($theme, 'empty-list-placeholder-color');
}
:host(:focus-within) {
[part~='toggle-icon'] {
background: var-get($theme, 'toggle-button-background-focus');
color: var-get($theme, 'toggle-button-foreground-focus');
igc-icon {
color: inherit;
}
}
[part~='clear-icon'] {
background: var-get($theme, 'clear-button-background-focus');
color: var-get($theme, 'clear-button-foreground-focus');
igc-icon {
color: inherit;
}
}
}
:host(:disabled),
:host([disabled]) {
::slotted([slot='prefix']),
::slotted([slot='suffix']),
igc-input::part(label),
igc-input::part(input)::placeholder {
color: var-get($theme, 'disabled-text-color');
}
[part~='clear-icon'] {
background: inherit;
color: var-get($theme, 'disabled-text-color');
igc-icon {
color: inherit;
}
}
[part~='toggle-icon'] {
background: var-get($theme, 'toggle-button-background-disabled');
color: var-get($theme, 'toggle-button-foreground-disabled');
igc-icon {
color: inherit;
}
}
}