semantic-forms 5.0.10 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/semantic-forms.cjs +8 -8
- package/dist/semantic-forms.cjs.map +1 -1
- package/dist/semantic-forms.css +135 -120
- package/dist/semantic-forms.css.map +1 -1
- package/dist/semantic-forms.js +8 -8
- package/dist/semantic-forms.js.map +1 -1
- package/dist/semantic-forms.min.js +1 -1
- package/dist/semantic-forms.min.js.map +1 -1
- package/dist/semantic-forms.min.mjs +1 -1
- package/dist/semantic-forms.min.mjs.map +1 -1
- package/dist/semantic-forms.mjs +6 -6
- package/dist/semantic-forms.mjs.map +1 -1
- package/docs/statics/pages/usage.html +29 -12
- package/package.json +6 -5
- package/semanticForms.scss +164 -103
package/semanticForms.scss
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
// #region global styles
|
|
2
2
|
form.semanticForms, form.semanticForms.light {
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
--
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
3
|
+
--semanticFormsFontFamily: sans-serif;
|
|
4
|
+
--semanticFormsFormBgColor: #fff;
|
|
5
|
+
--semanticFormsFormSubBgColor: #f5f5f5;
|
|
6
|
+
--semanticFormsTextColor: #000;
|
|
7
|
+
--semanticFormsBorderColor: #c0c0c0;
|
|
8
|
+
--semanticFormsSubBorderColor: #c0c0c0;
|
|
9
|
+
--semanticFormsPlaceholderColor: rgba(0, 0, 0, 0.75);
|
|
10
|
+
--semanticFormsScrollbarColor: #c0c0c0;
|
|
11
|
+
--semanticFormsClearButtonColor: #000;
|
|
12
|
+
--semanticFormsButtonGradientLight: #fff;
|
|
13
|
+
--semanticFormsButtonGradientDark: #c0c0c0;
|
|
14
|
+
--semanticFormsInvalid: #f00;
|
|
15
|
+
--semanticFormsInvalidBorder: 1px solid var(--semanticFormsInvalid);
|
|
16
|
+
--semanticFormsInputHeight: 38px;
|
|
17
|
+
--semanticFormsInputFontSize: 16px;
|
|
18
|
+
--semanticFormsInputTopMargin: 15px;
|
|
19
|
+
--semanticFormsInputMinWidth: 250px;
|
|
20
|
+
--semanticFormsBorderRadius: 10px;
|
|
21
|
+
--semanticFormsNestedFieldsetBgColor: rgba(0, 0, 0, .05);
|
|
22
|
+
--semanticFormsNestedFieldsetBorder: 1px rgba(0, 0, 0, .2) solid;
|
|
23
|
+
--semanticFormsNestedInputBgColor: #fff;
|
|
24
|
+
--semanticFormsBorder: 1px var(--semanticFormsBorderColor) solid;
|
|
25
|
+
--semanticFormsSelectIcon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23000'%3E%3Cpolygon points='0,0 100,0 50,50'/%3E%3C/svg%3E");
|
|
26
|
+
--semanticFormsCustomResizer: url("data:image/svg+xml;utf8,%3Csvg width='20' height='20' viewBox='0 0 5.2916665 5.2916666' version='1.1' id='svg5' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cdefs id='defs2' /%3E%3Cg id='layer1'%3E%3Cpath style='fill:%23aaa;stroke:%23aaa;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1' d='M 2.8245112,5.0994569 C 4.9396993,2.9842685 4.9396993,2.9842685 4.9396993,2.9842685' id='path1034' /%3E%3Cpath style='fill:%23aaa;stroke:%23aaa;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1' d='M 1.515747,5.0406977 C 4.8873304,1.6691138 4.8873304,1.6691138 4.8873304,1.6691138' id='path1034-1' /%3E%3Cpath style='fill:%23aaa;stroke:%23aaa;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='M 0.20657789,5.0909782 C 4.9312207,0.3663348 4.9312207,0.3663348 4.9312207,0.3663348' id='path1034-9' /%3E%3C/g%3E%3C/svg%3E")
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@mixin dark-mode {
|
|
30
|
-
--
|
|
30
|
+
--semanticFormsFormBgColor: #555;
|
|
31
31
|
--inputBackgroudColor: rgba(85,85,85,0.1);
|
|
32
|
-
--
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--customResizer: url("data:image/svg+xml;utf8,%3Csvg width='20' height='20' viewBox='0 0 5.2916665 5.2916666' version='1.1' id='svg5' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cdefs id='defs2' /%3E%3Cg id='layer1'%3E%3Cpath style='fill:%23c9c9c9;stroke:%23c9c9c9;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1' d='M 2.8245112,5.0994569 C 4.9396993,2.9842685 4.9396993,2.9842685 4.9396993,2.9842685' id='path1034' /%3E%3Cpath style='fill:%23c9c9c9;stroke:%23c9c9c9;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1' d='M 1.515747,5.0406977 C 4.8873304,1.6691138 4.8873304,1.6691138 4.8873304,1.6691138' id='path1034-1' /%3E%3Cpath style='fill:%23c9c9c9;stroke:%23c9c9c9;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='M 0.20657789,5.0909782 C 4.9312207,0.3663348 4.9312207,0.3663348 4.9312207,0.3663348' id='path1034-9' /%3E%3C/g%3E%3C/svg%3E");
|
|
32
|
+
--semanticFormsFormSubBgColor: #2f2f2f;
|
|
33
|
+
--semanticFormsTextColor: #fff;
|
|
34
|
+
--semanticFormsBorderColor: #656565;
|
|
35
|
+
--semanticFormsSubBorderColor: #3f3f3f;
|
|
36
|
+
--semanticFormsPlaceholderColor: rgba(255, 255, 255, 0.85);
|
|
37
|
+
--semanticFormsScrollbarColor: #373737;
|
|
38
|
+
--semanticFormsClearButtonColor: #fff;
|
|
39
|
+
--semanticFormsButtonGradientLight: #6f6f6f;
|
|
40
|
+
--semanticFormsButtonGradientDark: #373737;
|
|
41
|
+
--semanticFormsNestedFieldsetBgColor: rgba(255, 255, 255, .05);
|
|
42
|
+
--semanticFormsNestedFieldsetBorder: 1px rgba(255, 255, 255, .1) solid;
|
|
43
|
+
--semanticFormsNestedInputBgColor: rgba(255, 255, 255, .15);
|
|
44
|
+
--semanticFormsBorder: none;
|
|
45
|
+
--semanticFormsSelectIcon: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23fff'%3E%3Cpolygon stroke='%23fff' points='0,0 100,0 50,50'/%3E%3C/svg%3E");
|
|
46
|
+
--semanticFormsCustomResizer: url("data:image/svg+xml;utf8,%3Csvg width='20' height='20' viewBox='0 0 5.2916665 5.2916666' version='1.1' id='svg5' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cdefs id='defs2' /%3E%3Cg id='layer1'%3E%3Cpath style='fill:%23c9c9c9;stroke:%23c9c9c9;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1' d='M 2.8245112,5.0994569 C 4.9396993,2.9842685 4.9396993,2.9842685 4.9396993,2.9842685' id='path1034' /%3E%3Cpath style='fill:%23c9c9c9;stroke:%23c9c9c9;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1' d='M 1.515747,5.0406977 C 4.8873304,1.6691138 4.8873304,1.6691138 4.8873304,1.6691138' id='path1034-1' /%3E%3Cpath style='fill:%23c9c9c9;stroke:%23c9c9c9;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1' d='M 0.20657789,5.0909782 C 4.9312207,0.3663348 4.9312207,0.3663348 4.9312207,0.3663348' id='path1034-9' /%3E%3C/g%3E%3C/svg%3E");
|
|
48
47
|
|
|
49
48
|
input::-webkit-calendar-picker-indicator {
|
|
50
49
|
filter: invert(100%);
|
|
@@ -71,6 +70,7 @@ html:not(.light) {
|
|
|
71
70
|
// #endregion
|
|
72
71
|
|
|
73
72
|
form.semanticForms, form.semanticForms.light {
|
|
73
|
+
font-family: var(--semanticFormsFontFamily);
|
|
74
74
|
width: 100%;
|
|
75
75
|
container-type: inline-size;
|
|
76
76
|
container-name: semanticForm;
|
|
@@ -91,8 +91,8 @@ form.semanticForms, form.semanticForms.light {
|
|
|
91
91
|
dd:has(> input, > select, > textarea, > ul, > menu),
|
|
92
92
|
div:has(dt, dd),
|
|
93
93
|
dd > p {
|
|
94
|
-
color: var(--
|
|
95
|
-
font-family:
|
|
94
|
+
color: var(--semanticFormsTextColor);
|
|
95
|
+
font-family: var(--semanticFormsFontFamily);
|
|
96
96
|
box-sizing: border-box;
|
|
97
97
|
margin: 0;
|
|
98
98
|
padding: 0;
|
|
@@ -102,10 +102,10 @@ form.semanticForms, form.semanticForms.light {
|
|
|
102
102
|
input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
|
|
103
103
|
select,
|
|
104
104
|
textarea {
|
|
105
|
-
font-size: var(--
|
|
106
|
-
background: var(--
|
|
107
|
-
border: var(--
|
|
108
|
-
border-radius: var(--
|
|
105
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
106
|
+
background: var(--semanticFormsFormBgColor);
|
|
107
|
+
border: var(--semanticFormsBorder);
|
|
108
|
+
border-radius: var(--semanticFormsBorderRadius);
|
|
109
109
|
width: 100%;
|
|
110
110
|
touch-action: manipulation;
|
|
111
111
|
outline: none;
|
|
@@ -139,18 +139,18 @@ form.semanticForms, form.semanticForms.light {
|
|
|
139
139
|
// custom focus highlight
|
|
140
140
|
&:focus {
|
|
141
141
|
outline: none;
|
|
142
|
-
box-shadow: 0 0 0 1px var(--
|
|
142
|
+
box-shadow: 0 0 0 1px var(--semanticFormsBorderColor);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
|
|
147
147
|
select {
|
|
148
|
-
height: var(--
|
|
148
|
+
height: var(--semanticFormsInputHeight);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// specific styling for color input
|
|
152
152
|
input[type=color] {
|
|
153
|
-
height: var(--
|
|
153
|
+
height: var(--semanticFormsInputHeight);
|
|
154
154
|
padding: 4px !important;
|
|
155
155
|
padding-right: 30px !important;
|
|
156
156
|
}
|
|
@@ -164,19 +164,19 @@ form.semanticForms, form.semanticForms.light {
|
|
|
164
164
|
cursor: pointer;
|
|
165
165
|
|
|
166
166
|
& ~ label:first-of-type {
|
|
167
|
-
color: var(--
|
|
167
|
+
color: var(--semanticFormsTextColor) !important;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
input[type=file] {
|
|
172
172
|
cursor: pointer;
|
|
173
|
-
font-size: var(--
|
|
173
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
select {
|
|
177
177
|
cursor: pointer;
|
|
178
178
|
// custom dropdown graphic on select element
|
|
179
|
-
background-image: var(--
|
|
179
|
+
background-image: var(--semanticFormsSelectIcon);
|
|
180
180
|
background-size: 14px;
|
|
181
181
|
background-position: calc(100% - 8px) 16px;
|
|
182
182
|
background-repeat: no-repeat;
|
|
@@ -206,7 +206,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
206
206
|
position: absolute;
|
|
207
207
|
height: min-content;
|
|
208
208
|
// account for margin above each input
|
|
209
|
-
top: calc(var(--
|
|
209
|
+
top: calc(var(--semanticFormsInputTopMargin) + 6px);
|
|
210
210
|
right: 0;
|
|
211
211
|
width: 25px;
|
|
212
212
|
height: 25px;
|
|
@@ -214,7 +214,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
214
214
|
padding: 5px;
|
|
215
215
|
background: none;
|
|
216
216
|
border: none;
|
|
217
|
-
color: var(--
|
|
217
|
+
color: var(--semanticFormsClearButtonColor);
|
|
218
218
|
display: flex;
|
|
219
219
|
align-items: center;
|
|
220
220
|
justify-content: center;
|
|
@@ -246,15 +246,15 @@ form.semanticForms, form.semanticForms.light {
|
|
|
246
246
|
-webkit-appearance: none;
|
|
247
247
|
cursor: pointer;
|
|
248
248
|
max-width: max-content;
|
|
249
|
-
background-image: linear-gradient(to bottom, var(--
|
|
250
|
-
border: 2px var(--
|
|
249
|
+
background-image: linear-gradient(to bottom, var(--semanticFormsButtonGradientLight) 0%, var(--semanticFormsButtonGradientDark) 100%);
|
|
250
|
+
border: 2px var(--semanticFormsButtonGradientDark) solid;
|
|
251
251
|
border-radius: 20px;
|
|
252
252
|
padding: 5px 25px;
|
|
253
253
|
font-size: 100%;
|
|
254
254
|
line-height: 1;
|
|
255
255
|
|
|
256
256
|
&:active {
|
|
257
|
-
background-image: linear-gradient(to bottom, var(--
|
|
257
|
+
background-image: linear-gradient(to bottom, var(--semanticFormsButtonGradientDark) 0%, var(--semanticFormsButtonGradientLight) 100%);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -273,7 +273,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
273
273
|
// #region invalid styling
|
|
274
274
|
[data-invalid-text] {
|
|
275
275
|
display: none;
|
|
276
|
-
color: var(--
|
|
276
|
+
color: var(--semanticFormsInvalid);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
input:not([type='submit'], [type='reset'], [type='image']),
|
|
@@ -281,10 +281,10 @@ form.semanticForms, form.semanticForms.light {
|
|
|
281
281
|
textarea {
|
|
282
282
|
&.invalid,
|
|
283
283
|
&:user-invalid {
|
|
284
|
-
border: var(--
|
|
284
|
+
border: var(--semanticFormsInvalidBorder) !important;
|
|
285
285
|
|
|
286
286
|
~ label:nth-of-type(2) {
|
|
287
|
-
color: var(--
|
|
287
|
+
color: var(--semanticFormsInvalid) !important;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
~ [data-invalid-text] {
|
|
@@ -309,16 +309,16 @@ form.semanticForms, form.semanticForms.light {
|
|
|
309
309
|
select:-webkit-autofill:hover,
|
|
310
310
|
select:-webkit-autofill:focus,
|
|
311
311
|
select:-webkit-autofill:active {
|
|
312
|
-
-webkit-box-shadow: 0 0 0 1000px var(--
|
|
312
|
+
-webkit-box-shadow: 0 0 0 1000px var(--semanticFormsFormBgColor) inset;
|
|
313
313
|
transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
|
|
314
314
|
transition-delay: 5000s;
|
|
315
315
|
transition-property: background-color, color;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
fieldset {
|
|
319
|
-
border-radius: var(--
|
|
320
|
-
background: var(--
|
|
321
|
-
border: 1px var(--
|
|
319
|
+
border-radius: var(--semanticFormsBorderRadius);
|
|
320
|
+
background: var(--semanticFormsFormSubBgColor);
|
|
321
|
+
border: 1px var(--semanticFormsSubBorderColor) solid;
|
|
322
322
|
display: flex;
|
|
323
323
|
flex-direction: column;
|
|
324
324
|
gap: 5px;
|
|
@@ -327,14 +327,14 @@ form.semanticForms, form.semanticForms.light {
|
|
|
327
327
|
|
|
328
328
|
// nested fieldsets are darkened
|
|
329
329
|
> fieldset {
|
|
330
|
-
background-color: var(--
|
|
331
|
-
border: var(--
|
|
330
|
+
background-color: var(--semanticFormsNestedFieldsetBgColor);
|
|
331
|
+
border: var(--semanticFormsNestedFieldsetBorder);
|
|
332
332
|
|
|
333
333
|
// add opacity to styled inputs to prevent blending with background
|
|
334
334
|
input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
|
|
335
335
|
select,
|
|
336
336
|
textarea {
|
|
337
|
-
background-color: var(--
|
|
337
|
+
background-color: var(--semanticFormsNestedInputBgColor);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
}
|
|
@@ -350,11 +350,11 @@ form.semanticForms, form.semanticForms.light {
|
|
|
350
350
|
// update for scrollbars
|
|
351
351
|
@supports (scrollbar-color: auto) {
|
|
352
352
|
textarea {
|
|
353
|
-
scrollbar-color: var(--
|
|
353
|
+
scrollbar-color: var(--semanticFormsScrollbarColor) transparent;
|
|
354
354
|
|
|
355
355
|
&::-webkit-resizer {
|
|
356
356
|
border: none;
|
|
357
|
-
background-image: var(--
|
|
357
|
+
background-image: var(--semanticFormsCustomResizer);
|
|
358
358
|
background-size: 14px;
|
|
359
359
|
background-repeat: no-repeat;
|
|
360
360
|
background-position: 100%;
|
|
@@ -367,7 +367,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
367
367
|
|
|
368
368
|
dl:has(dt > label, dd > input, dd > select, dd > textarea) {
|
|
369
369
|
display: grid;
|
|
370
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--
|
|
370
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
371
371
|
gap: 10px;
|
|
372
372
|
margin-bottom: 10px;
|
|
373
373
|
|
|
@@ -397,7 +397,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
397
397
|
&.checkboxes ul, &.radios ul {
|
|
398
398
|
display: flex;
|
|
399
399
|
flex-direction: column;
|
|
400
|
-
margin-top: var(--
|
|
400
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
401
401
|
padding-left: 10px;
|
|
402
402
|
gap: 5px;
|
|
403
403
|
|
|
@@ -443,7 +443,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
443
443
|
input[type=radio] + label:first-of-type {
|
|
444
444
|
// shift text down to match center
|
|
445
445
|
padding-top: 2px;
|
|
446
|
-
font-size: var(--
|
|
446
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
447
447
|
|
|
448
448
|
span.required {
|
|
449
449
|
cursor: help;
|
|
@@ -458,10 +458,13 @@ form.semanticForms, form.semanticForms.light {
|
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
.floatLabelForm {
|
|
461
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
462
|
+
|
|
461
463
|
div {
|
|
462
464
|
position: relative;
|
|
463
465
|
width: 100%;
|
|
464
|
-
min-width:
|
|
466
|
+
min-width: var(--semanticFormsInputMinWidth);
|
|
467
|
+
max-width: 100%;
|
|
465
468
|
max-width: 365px;
|
|
466
469
|
|
|
467
470
|
dd:not(.singleCheckbox, .checkboxes, .radios) {
|
|
@@ -470,31 +473,42 @@ form.semanticForms, form.semanticForms.light {
|
|
|
470
473
|
textarea {
|
|
471
474
|
&:focus:not([type=checkbox], [type=radio]) ~ label:first-of-type,
|
|
472
475
|
&:not(:placeholder-shown, [type=checkbox], [type=radio]) ~ label:first-of-type {
|
|
473
|
-
color: var(--
|
|
476
|
+
color: var(--semanticFormsTextColor) !important;
|
|
477
|
+
// TODO: finish this work on making the help icon responsive
|
|
478
|
+
// width: 100%;
|
|
479
|
+
// width: calc(100% + 20px);
|
|
474
480
|
transform: translateY(-150%) scale(0.7);
|
|
481
|
+
|
|
482
|
+
// span.required,
|
|
483
|
+
// span.help {
|
|
484
|
+
// position: static;
|
|
485
|
+
// right: auto;
|
|
486
|
+
// }
|
|
475
487
|
}
|
|
476
488
|
}
|
|
477
489
|
|
|
478
490
|
select ~ label:first-of-type {
|
|
479
491
|
// force label to be correct color
|
|
480
|
-
color: var(--
|
|
492
|
+
color: var(--semanticFormsTextColor) !important;
|
|
481
493
|
}
|
|
482
494
|
|
|
483
495
|
label:first-of-type {
|
|
484
|
-
max-width: 230px !important; /* this prevents label text from sticking out of the input element */
|
|
485
496
|
line-height: 1.2;
|
|
486
|
-
font-size: var(--
|
|
497
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
487
498
|
position: absolute;
|
|
488
499
|
transform-origin: left center;
|
|
489
500
|
pointer-events: none;
|
|
490
501
|
// when the label is positioned within the input it needs a buffer
|
|
491
|
-
top: calc(var(--
|
|
502
|
+
top: calc(var(--semanticFormsInputTopMargin) + 10px);
|
|
492
503
|
left: 20px;
|
|
493
504
|
transition: transform 250ms;
|
|
494
505
|
cursor: text;
|
|
506
|
+
flex: 1;
|
|
495
507
|
white-space: nowrap;
|
|
496
508
|
overflow: hidden;
|
|
497
509
|
text-overflow: ellipsis;
|
|
510
|
+
min-width: 0;
|
|
511
|
+
width: calc(100% - 35px);
|
|
498
512
|
}
|
|
499
513
|
|
|
500
514
|
// subtext
|
|
@@ -502,13 +516,13 @@ form.semanticForms, form.semanticForms.light {
|
|
|
502
516
|
margin-top: -5px;
|
|
503
517
|
padding-left: 20px;
|
|
504
518
|
font-size: small;
|
|
505
|
-
color: var(--
|
|
519
|
+
color: var(--semanticFormsTextColor);
|
|
506
520
|
}
|
|
507
521
|
|
|
508
522
|
input,
|
|
509
523
|
textarea,
|
|
510
524
|
select {
|
|
511
|
-
margin-top: var(--
|
|
525
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
512
526
|
}
|
|
513
527
|
|
|
514
528
|
input,
|
|
@@ -557,19 +571,46 @@ form.semanticForms, form.semanticForms.light {
|
|
|
557
571
|
|
|
558
572
|
label:first-of-type {
|
|
559
573
|
user-select: none;
|
|
560
|
-
color: var(--
|
|
574
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
561
575
|
touch-action: manipulation;
|
|
562
576
|
|
|
577
|
+
// TODO: same as below
|
|
578
|
+
// &:has(span.help) {
|
|
579
|
+
// width: 80%;
|
|
580
|
+
// padding-right: 20px;
|
|
581
|
+
// }
|
|
582
|
+
|
|
583
|
+
// &:has(span.required) {
|
|
584
|
+
// width: 80%;
|
|
585
|
+
// padding-right: 10px;
|
|
586
|
+
// }
|
|
587
|
+
|
|
563
588
|
span.required {
|
|
589
|
+
// TODO: this places the required asterisk too far to the right when the float label is shrunk
|
|
590
|
+
// position: absolute;
|
|
591
|
+
// right: 0;
|
|
564
592
|
cursor: help;
|
|
565
593
|
pointer-events: auto;
|
|
566
594
|
color: red;
|
|
567
595
|
}
|
|
568
596
|
|
|
569
597
|
span.help {
|
|
598
|
+
// TODO: this places the help icon too far to the right when the float label is shrunk
|
|
599
|
+
// position: absolute;
|
|
600
|
+
// right: 0;
|
|
570
601
|
cursor: help;
|
|
571
602
|
pointer-events: auto;
|
|
572
603
|
}
|
|
604
|
+
|
|
605
|
+
// // TODO: cover the case where an input is required AND has help text
|
|
606
|
+
// &:has(span.required, span.help) {
|
|
607
|
+
// width: 80%;
|
|
608
|
+
// padding-right: 30px;
|
|
609
|
+
|
|
610
|
+
// span.required {
|
|
611
|
+
// right: 18px;
|
|
612
|
+
// }
|
|
613
|
+
// }
|
|
573
614
|
}
|
|
574
615
|
}
|
|
575
616
|
|
|
@@ -579,14 +620,27 @@ form.semanticForms, form.semanticForms.light {
|
|
|
579
620
|
|
|
580
621
|
label {
|
|
581
622
|
user-select: auto;
|
|
582
|
-
color: var(--
|
|
623
|
+
color: var(--semanticFormsTextColor);
|
|
624
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
583
625
|
position: absolute;
|
|
584
626
|
transform-origin: left center;
|
|
585
627
|
transform: translateY(-100%) scale(0.7);
|
|
586
|
-
top: var(--
|
|
628
|
+
top: var(--semanticFormsInputTopMargin);
|
|
587
629
|
left: 10px;
|
|
630
|
+
white-space: nowrap;
|
|
631
|
+
overflow: hidden;
|
|
632
|
+
text-overflow: ellipsis;
|
|
633
|
+
min-width: 0;
|
|
634
|
+
width: calc(100% + 20px);
|
|
635
|
+
|
|
636
|
+
// TODO: remove this? // &:has(span.help) {
|
|
637
|
+
// width: 100%;
|
|
638
|
+
// padding-right: 20px;
|
|
639
|
+
// }
|
|
588
640
|
|
|
589
641
|
span.help {
|
|
642
|
+
// TODO: remove this? // position: absolute;
|
|
643
|
+
// right: 0;
|
|
590
644
|
cursor: help;
|
|
591
645
|
pointer-events: auto;
|
|
592
646
|
}
|
|
@@ -595,7 +649,14 @@ form.semanticForms, form.semanticForms.light {
|
|
|
595
649
|
|
|
596
650
|
&:has(dd input:required) {
|
|
597
651
|
dt {
|
|
652
|
+
label {
|
|
653
|
+
width: 100%;
|
|
654
|
+
padding-right:10px;
|
|
655
|
+
}
|
|
656
|
+
|
|
598
657
|
label > span {
|
|
658
|
+
// TODO: remove this? // position: absolute;
|
|
659
|
+
// right: 0;
|
|
599
660
|
margin-left: 5px;
|
|
600
661
|
cursor: help;
|
|
601
662
|
pointer-events: auto;
|
|
@@ -608,7 +669,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
608
669
|
|
|
609
670
|
input, textarea {
|
|
610
671
|
&::placeholder {
|
|
611
|
-
color: var(--
|
|
672
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
612
673
|
opacity: 1;
|
|
613
674
|
}
|
|
614
675
|
}
|
|
@@ -656,33 +717,33 @@ form.semanticForms, form.semanticForms.light {
|
|
|
656
717
|
|
|
657
718
|
fieldset.colspan-full dl,
|
|
658
719
|
dl.colspan-full {
|
|
659
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--
|
|
720
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
660
721
|
}
|
|
661
722
|
|
|
662
723
|
fieldset.colspan-5 dl,
|
|
663
724
|
dl.colspan-5 {
|
|
664
|
-
grid-template-columns: repeat(5, minmax(var(--
|
|
725
|
+
grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
665
726
|
}
|
|
666
727
|
|
|
667
728
|
fieldset.colspan-4 dl,
|
|
668
729
|
dl.colspan-4 {
|
|
669
|
-
grid-template-columns: repeat(4, minmax(var(--
|
|
730
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
670
731
|
}
|
|
671
732
|
|
|
672
733
|
|
|
673
734
|
fieldset.colspan-3 dl,
|
|
674
735
|
dl.colspan-3 {
|
|
675
|
-
grid-template-columns: repeat(3, minmax(var(--
|
|
736
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
676
737
|
}
|
|
677
738
|
|
|
678
739
|
fieldset.colspan-2 dl,
|
|
679
740
|
dl.colspan-2 {
|
|
680
|
-
grid-template-columns: repeat(2, minmax(var(--
|
|
741
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
681
742
|
}
|
|
682
743
|
|
|
683
744
|
fieldset.colspan-1 dl,
|
|
684
745
|
dl.colspan-1 {
|
|
685
|
-
grid-template-columns: repeat(1, minmax(var(--
|
|
746
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
686
747
|
}
|
|
687
748
|
// #endregion
|
|
688
749
|
|
|
@@ -691,7 +752,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
691
752
|
@container semanticForm (width > 2250px) {
|
|
692
753
|
&.lowFlow fieldset dl,
|
|
693
754
|
&.lowFlow dl {
|
|
694
|
-
grid-template-columns: repeat(6, minmax(var(--
|
|
755
|
+
grid-template-columns: repeat(6, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
695
756
|
|
|
696
757
|
& dt:nth-of-type(6n + 1),
|
|
697
758
|
& dd:nth-of-type(6n + 1) {
|
|
@@ -728,7 +789,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
728
789
|
@container semanticForm (width < 2250px) {
|
|
729
790
|
&.lowFlow fieldset dl,
|
|
730
791
|
&.lowFlow dl {
|
|
731
|
-
grid-template-columns: repeat(5, minmax(var(--
|
|
792
|
+
grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
732
793
|
|
|
733
794
|
& dt:nth-of-type(5n + 1),
|
|
734
795
|
& dd:nth-of-type(5n + 1) {
|
|
@@ -760,7 +821,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
760
821
|
@container semanticForm (width < 1300px) {
|
|
761
822
|
fieldset.colspan-5 dl,
|
|
762
823
|
dl.colspan-5 {
|
|
763
|
-
grid-template-columns: repeat(4, minmax(var(--
|
|
824
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
764
825
|
}
|
|
765
826
|
|
|
766
827
|
div.colspan-5 {
|
|
@@ -771,7 +832,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
771
832
|
&.lowFlow dl,
|
|
772
833
|
&.lowFlow fieldset.colspan-5 dl,
|
|
773
834
|
&.lowFlow dl.colspan-5 {
|
|
774
|
-
grid-template-columns: repeat(4, minmax(var(--
|
|
835
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
775
836
|
|
|
776
837
|
& dt:nth-of-type(4n + 1),
|
|
777
838
|
& dd:nth-of-type(4n + 1) {
|
|
@@ -800,7 +861,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
800
861
|
fieldset.colspan-5 dl,
|
|
801
862
|
dl.colspan-4,
|
|
802
863
|
dl.colspan-5 {
|
|
803
|
-
grid-template-columns: repeat(3, minmax(var(--
|
|
864
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
804
865
|
}
|
|
805
866
|
|
|
806
867
|
div.colspan-4, div.colspan-5 {
|
|
@@ -813,7 +874,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
813
874
|
&.lowFlow dl.colspan-4,
|
|
814
875
|
&.lowFlow fieldset.colspan-5 dl,
|
|
815
876
|
&.lowFlow dl.colspan-5 {
|
|
816
|
-
grid-template-columns: repeat(3, minmax(var(--
|
|
877
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
817
878
|
|
|
818
879
|
& dt:nth-of-type(3n + 1),
|
|
819
880
|
& dd:nth-of-type(3n + 1) {
|
|
@@ -839,7 +900,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
839
900
|
dl.colspan-3,
|
|
840
901
|
dl.colspan-4,
|
|
841
902
|
dl.colspan-5 {
|
|
842
|
-
grid-template-columns: repeat(2, minmax(var(--
|
|
903
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
843
904
|
}
|
|
844
905
|
|
|
845
906
|
div.colspan-3,
|
|
@@ -856,7 +917,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
856
917
|
&.lowFlow dl.colspan-4,
|
|
857
918
|
&.lowFlow fieldset.colspan-5 dl,
|
|
858
919
|
&.lowFlow dl.colspan-5 {
|
|
859
|
-
grid-template-columns: repeat(2, minmax(var(--
|
|
920
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
860
921
|
|
|
861
922
|
& dt:nth-of-type(2n + 1),
|
|
862
923
|
& dd:nth-of-type(2n + 1) {
|
|
@@ -880,7 +941,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
880
941
|
dl.colspan-4,
|
|
881
942
|
dl.colspan-5,
|
|
882
943
|
dl {
|
|
883
|
-
grid-template-columns: repeat(1, minmax(var(--
|
|
944
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
884
945
|
}
|
|
885
946
|
|
|
886
947
|
div.colspan-2, div.colspan-3, div.colspan-4, div.colspan-5 {
|
|
@@ -897,7 +958,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
897
958
|
&.lowFlow dl.colspan-4,
|
|
898
959
|
&.lowFlow fieldset.colspan-5 dl,
|
|
899
960
|
&.lowFlow dl.colspan-5 {
|
|
900
|
-
grid-template-columns: repeat(1, minmax(var(--
|
|
961
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
901
962
|
|
|
902
963
|
& dt:nth-of-type(n + 1),
|
|
903
964
|
& dd:nth-of-type(n + 1) {
|
|
@@ -950,14 +1011,14 @@ form.semanticForms, form.semanticForms.light {
|
|
|
950
1011
|
label {
|
|
951
1012
|
margin-top: -5px;
|
|
952
1013
|
font-size: small;
|
|
953
|
-
color: var(--
|
|
1014
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
954
1015
|
}
|
|
955
1016
|
}
|
|
956
1017
|
}
|
|
957
1018
|
|
|
958
1019
|
.checkboxes ul,
|
|
959
1020
|
.radios ul {
|
|
960
|
-
margin-top: calc(var(--
|
|
1021
|
+
margin-top: calc(var(--semanticFormsInputTopMargin) / 2);
|
|
961
1022
|
}
|
|
962
1023
|
}
|
|
963
1024
|
// #endregion
|