-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathform.css
158 lines (127 loc) · 3.37 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
:root {
--tw-ring-inset: 'var(--tw-empty,/*!*/ /*!*/)';
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: theme('colors.blue.600');
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
}
.form-group {
@apply mb-5;
&:last-child {
@apply mb-0;
}
&.formio-hidden {
@apply hidden;
}
}
.builder-component > .form-group {
@apply mb-5;
}
.form-control {
@apply appearance-none bg-white leading-normal px-3 py-2 block w-full rounded-md border-1 border-gray-300 shadow-sm;
&.form-control-sm {
@apply px-2 py-1 text-sm;
}
}
.form-control:disabled, .form-control[readonly] {
@apply bg-gray-200 border-transparent shadow-none;
}
.formio-modified:not(.has-error) {
label {
@apply text-green-600;
}
.form-control {
@apply border-green-600;
&:focus {
@apply outline-none border-green-300 ring ring-green-200 ring-opacity-50;
outline-offset: theme('outline.none[1]');
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
border-color: theme('colors.green.600');
}
}
}
.help-block {
@apply block text-sm text-center;
}
.has-error {
label, .error {
@apply text-red-600;
}
.help-block {
@apply p-3 block;
@apply text-red-700;
}
.form-control {
@apply border-red-600;
&:focus {
@apply outline-none border-red-300 ring ring-red-200 ring-opacity-50;
outline-offset: theme('outline.none[1]');
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
border-color: theme('colors.red.600');
}
}
}
input.form-control::placeholder,
textarea.form-control::placeholder {
@apply text-gray-500 opacity-100;
}
.form-control:focus {
@apply outline-none border-primary-300 ring ring-primary-50 ring-opacity-50;
outline-offset: theme('outline.none[1]');
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
border-color: theme('colors.blue.600');
}
.form-control:disabled, .form-control[readonly] {
@apply bg-gray-300 opacity-100;
}
::-webkit-datetime-edit-fields-wrapper {
@apply p-0;
}
::-webkit-date-and-time-value {
min-height: 1.5em;
}
select.form-control {
@apply bg-no-repeat pr-10;
print-color-adjust: exact;
background-size: 1.5em 1.5em;
background-position: right theme('spacing.2') center;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
&:focus::-ms-value {
@apply text-base bg-white;
}
}
select.form-control[size],
select.form-control[multiple] {
@apply h-auto pr-3;
background-image: none;
}
textarea.form-control {
@apply h-auto;
}
.form-control-file,
.form-control-range {
@apply block w-full;
}
.form-text {
@apply block mt-1;
&.error {
@apply text-red-600 text-sm;
}
}
.text-muted {
@apply text-gray-500;
&[ref="tooltip"] {
@apply text-white;
}
}
.col-form-label {
@apply flex items-center pt-1 pb-2 m-0;
}
.field-required:after {
@apply z-1 ml-1;
}
.formio-component hr,
hr {
@apply border-gray-300 mx-20 mb-5;
}