-
Notifications
You must be signed in to change notification settings - Fork 37
/
form.css
108 lines (88 loc) · 1.74 KB
/
form.css
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
/**
* Shared form styles
*/
/**
* Input Group
*/
.inputGroup {
position: relative;
}
/**
* Default input, textarea and select styling
*/
.formControl {
margin-bottom: var(--control-margin-bottom);
border: 1px solid var(--color-border-form);
color: var(--color-text);
background-color: var(--color-fill-form-element);
width: 100%;
outline: 0;
letter-spacing: 0.4px;
border-radius: 0;
min-height: var(--control-min-size-desktop);
display: flex;
align-items: center;
&:focus,
&.isFocused {
border: 1px solid var(--primary);
box-shadow: inset 0 0 0 2px rgba(37 118 195 / 30%);
}
&.fullWidth {
width: 100%;
}
&.noBorder {
border: 0;
}
&.marginBottom0 {
margin-bottom: 0;
}
&:disabled,
&.isDisabled {
background-color: #ebebe4;
color: #777;
border: 1px solid var(--color-border);
box-shadow: none;
}
/**
* Feedback styles
*/
&.hasFeedback {
margin-bottom: 0.4rem;
}
&.hasWarning {
border-color: var(--warn);
background-color: oklch(from var(--warn) l c h / 5%);
}
&.hasError {
border-color: var(--error);
background-color: oklch(from var(--error) l c h / 5%);
}
&.isValid {
border-color: var(--success);
background-color: oklch(from var(--success) l c h / 5%);
}
&.isChanged {
background-color: oklch(from var(--primary) l c h / 20%);
}
&::-ms-clear {
display: none;
}
}
/**
* Feedback block
*/
.feedbackBlock {
padding: 0 var(--input-vertical-padding);
font-size: var(--font-size-medium);
&:last-child {
margin-bottom: var(--control-margin-bottom);
}
}
.feedbackError {
composes: feedbackBlock;
color: var(--error);
}
.feedbackWarning {
composes: feedbackBlock;
color: var(--warn);
}