-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathinput.base.scss
More file actions
85 lines (72 loc) · 1.62 KB
/
input.base.scss
File metadata and controls
85 lines (72 loc) · 1.62 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
@use 'styles/common/component';
@use 'styles/utilities' as *;
%starfix {
display: flex;
align-items: center;
}
:host {
position: relative;
display: block;
font-family: var(--ig-font-family);
outline-style: none;
::part(helper-text) {
@include type-style('caption');
@include line-clamp(2, true, true);
}
}
::slotted(igc-icon) {
--component-size: var(--input-size) !important;
}
[part='label'] {
display: block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
[part~='input'] {
width: 100%;
border: none;
outline-style: none;
font-family: var(--ig-font-family);
z-index: 1;
// This is a hack that removes the autofill background and it's essential,
// otherwise the background is on top of the floating label in material theme.
// The !important flag is because themes that defin transition delay on that element are overriding the transition delay hack
&:-webkit-autofill,
&:-webkit-autofill:hover,
&:-webkit-autofill:focus,
&:-webkit-autofill:active,
&:autofill,
&:autofill:hover,
&:autofill:focus,
&:autofill:active{
transition-delay: 99999s !important;
}
}
[part^='container'] {
position: relative;
display: grid;
}
[part='prefix'],
[part='suffix'] {
display: none;
overflow: hidden;
}
[part~='prefixed'] {
[part='prefix'] {
@extend %starfix;
}
}
[part~='suffixed'] {
[part='suffix'] {
@extend %starfix;
}
}
:host([required]) {
[part='label']::after {
content: '*';
}
}
:host([disabled]) {
pointer-events: none;
}