semantic-forms 5.0.9 → 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 +12 -0
- package/dist/semantic-forms.cjs +8 -8
- package/dist/semantic-forms.cjs.map +1 -1
- package/dist/semantic-forms.css +138 -127
- 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 +165 -105
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,16 +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
|
-
&:active
|
|
257
|
-
|
|
258
|
-
background-image: linear-gradient(to bottom, var(--buttonGradientDark) 0%, var(--buttonGradientLight) 100%);
|
|
256
|
+
&:active {
|
|
257
|
+
background-image: linear-gradient(to bottom, var(--semanticFormsButtonGradientDark) 0%, var(--semanticFormsButtonGradientLight) 100%);
|
|
259
258
|
}
|
|
260
259
|
}
|
|
261
260
|
|
|
@@ -274,7 +273,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
274
273
|
// #region invalid styling
|
|
275
274
|
[data-invalid-text] {
|
|
276
275
|
display: none;
|
|
277
|
-
color: var(--
|
|
276
|
+
color: var(--semanticFormsInvalid);
|
|
278
277
|
}
|
|
279
278
|
|
|
280
279
|
input:not([type='submit'], [type='reset'], [type='image']),
|
|
@@ -282,10 +281,10 @@ form.semanticForms, form.semanticForms.light {
|
|
|
282
281
|
textarea {
|
|
283
282
|
&.invalid,
|
|
284
283
|
&:user-invalid {
|
|
285
|
-
border: var(--
|
|
284
|
+
border: var(--semanticFormsInvalidBorder) !important;
|
|
286
285
|
|
|
287
286
|
~ label:nth-of-type(2) {
|
|
288
|
-
color: var(--
|
|
287
|
+
color: var(--semanticFormsInvalid) !important;
|
|
289
288
|
}
|
|
290
289
|
|
|
291
290
|
~ [data-invalid-text] {
|
|
@@ -310,16 +309,16 @@ form.semanticForms, form.semanticForms.light {
|
|
|
310
309
|
select:-webkit-autofill:hover,
|
|
311
310
|
select:-webkit-autofill:focus,
|
|
312
311
|
select:-webkit-autofill:active {
|
|
313
|
-
-webkit-box-shadow: 0 0 0 1000px var(--
|
|
312
|
+
-webkit-box-shadow: 0 0 0 1000px var(--semanticFormsFormBgColor) inset;
|
|
314
313
|
transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
|
|
315
314
|
transition-delay: 5000s;
|
|
316
315
|
transition-property: background-color, color;
|
|
317
316
|
}
|
|
318
317
|
|
|
319
318
|
fieldset {
|
|
320
|
-
border-radius: var(--
|
|
321
|
-
background: var(--
|
|
322
|
-
border: 1px var(--
|
|
319
|
+
border-radius: var(--semanticFormsBorderRadius);
|
|
320
|
+
background: var(--semanticFormsFormSubBgColor);
|
|
321
|
+
border: 1px var(--semanticFormsSubBorderColor) solid;
|
|
323
322
|
display: flex;
|
|
324
323
|
flex-direction: column;
|
|
325
324
|
gap: 5px;
|
|
@@ -328,14 +327,14 @@ form.semanticForms, form.semanticForms.light {
|
|
|
328
327
|
|
|
329
328
|
// nested fieldsets are darkened
|
|
330
329
|
> fieldset {
|
|
331
|
-
background-color: var(--
|
|
332
|
-
border: var(--
|
|
330
|
+
background-color: var(--semanticFormsNestedFieldsetBgColor);
|
|
331
|
+
border: var(--semanticFormsNestedFieldsetBorder);
|
|
333
332
|
|
|
334
333
|
// add opacity to styled inputs to prevent blending with background
|
|
335
334
|
input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
|
|
336
335
|
select,
|
|
337
336
|
textarea {
|
|
338
|
-
background-color: var(--
|
|
337
|
+
background-color: var(--semanticFormsNestedInputBgColor);
|
|
339
338
|
}
|
|
340
339
|
}
|
|
341
340
|
}
|
|
@@ -351,11 +350,11 @@ form.semanticForms, form.semanticForms.light {
|
|
|
351
350
|
// update for scrollbars
|
|
352
351
|
@supports (scrollbar-color: auto) {
|
|
353
352
|
textarea {
|
|
354
|
-
scrollbar-color: var(--
|
|
353
|
+
scrollbar-color: var(--semanticFormsScrollbarColor) transparent;
|
|
355
354
|
|
|
356
355
|
&::-webkit-resizer {
|
|
357
356
|
border: none;
|
|
358
|
-
background-image: var(--
|
|
357
|
+
background-image: var(--semanticFormsCustomResizer);
|
|
359
358
|
background-size: 14px;
|
|
360
359
|
background-repeat: no-repeat;
|
|
361
360
|
background-position: 100%;
|
|
@@ -368,7 +367,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
368
367
|
|
|
369
368
|
dl:has(dt > label, dd > input, dd > select, dd > textarea) {
|
|
370
369
|
display: grid;
|
|
371
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--
|
|
370
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
372
371
|
gap: 10px;
|
|
373
372
|
margin-bottom: 10px;
|
|
374
373
|
|
|
@@ -398,7 +397,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
398
397
|
&.checkboxes ul, &.radios ul {
|
|
399
398
|
display: flex;
|
|
400
399
|
flex-direction: column;
|
|
401
|
-
margin-top: var(--
|
|
400
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
402
401
|
padding-left: 10px;
|
|
403
402
|
gap: 5px;
|
|
404
403
|
|
|
@@ -444,7 +443,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
444
443
|
input[type=radio] + label:first-of-type {
|
|
445
444
|
// shift text down to match center
|
|
446
445
|
padding-top: 2px;
|
|
447
|
-
font-size: var(--
|
|
446
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
448
447
|
|
|
449
448
|
span.required {
|
|
450
449
|
cursor: help;
|
|
@@ -459,10 +458,13 @@ form.semanticForms, form.semanticForms.light {
|
|
|
459
458
|
}
|
|
460
459
|
|
|
461
460
|
.floatLabelForm {
|
|
461
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
462
|
+
|
|
462
463
|
div {
|
|
463
464
|
position: relative;
|
|
464
465
|
width: 100%;
|
|
465
|
-
min-width:
|
|
466
|
+
min-width: var(--semanticFormsInputMinWidth);
|
|
467
|
+
max-width: 100%;
|
|
466
468
|
max-width: 365px;
|
|
467
469
|
|
|
468
470
|
dd:not(.singleCheckbox, .checkboxes, .radios) {
|
|
@@ -471,31 +473,42 @@ form.semanticForms, form.semanticForms.light {
|
|
|
471
473
|
textarea {
|
|
472
474
|
&:focus:not([type=checkbox], [type=radio]) ~ label:first-of-type,
|
|
473
475
|
&:not(:placeholder-shown, [type=checkbox], [type=radio]) ~ label:first-of-type {
|
|
474
|
-
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);
|
|
475
480
|
transform: translateY(-150%) scale(0.7);
|
|
481
|
+
|
|
482
|
+
// span.required,
|
|
483
|
+
// span.help {
|
|
484
|
+
// position: static;
|
|
485
|
+
// right: auto;
|
|
486
|
+
// }
|
|
476
487
|
}
|
|
477
488
|
}
|
|
478
489
|
|
|
479
490
|
select ~ label:first-of-type {
|
|
480
491
|
// force label to be correct color
|
|
481
|
-
color: var(--
|
|
492
|
+
color: var(--semanticFormsTextColor) !important;
|
|
482
493
|
}
|
|
483
494
|
|
|
484
495
|
label:first-of-type {
|
|
485
|
-
max-width: 230px !important; /* this prevents label text from sticking out of the input element */
|
|
486
496
|
line-height: 1.2;
|
|
487
|
-
font-size: var(--
|
|
497
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
488
498
|
position: absolute;
|
|
489
499
|
transform-origin: left center;
|
|
490
500
|
pointer-events: none;
|
|
491
501
|
// when the label is positioned within the input it needs a buffer
|
|
492
|
-
top: calc(var(--
|
|
502
|
+
top: calc(var(--semanticFormsInputTopMargin) + 10px);
|
|
493
503
|
left: 20px;
|
|
494
504
|
transition: transform 250ms;
|
|
495
505
|
cursor: text;
|
|
506
|
+
flex: 1;
|
|
496
507
|
white-space: nowrap;
|
|
497
508
|
overflow: hidden;
|
|
498
509
|
text-overflow: ellipsis;
|
|
510
|
+
min-width: 0;
|
|
511
|
+
width: calc(100% - 35px);
|
|
499
512
|
}
|
|
500
513
|
|
|
501
514
|
// subtext
|
|
@@ -503,13 +516,13 @@ form.semanticForms, form.semanticForms.light {
|
|
|
503
516
|
margin-top: -5px;
|
|
504
517
|
padding-left: 20px;
|
|
505
518
|
font-size: small;
|
|
506
|
-
color: var(--
|
|
519
|
+
color: var(--semanticFormsTextColor);
|
|
507
520
|
}
|
|
508
521
|
|
|
509
522
|
input,
|
|
510
523
|
textarea,
|
|
511
524
|
select {
|
|
512
|
-
margin-top: var(--
|
|
525
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
513
526
|
}
|
|
514
527
|
|
|
515
528
|
input,
|
|
@@ -558,19 +571,46 @@ form.semanticForms, form.semanticForms.light {
|
|
|
558
571
|
|
|
559
572
|
label:first-of-type {
|
|
560
573
|
user-select: none;
|
|
561
|
-
color: var(--
|
|
574
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
562
575
|
touch-action: manipulation;
|
|
563
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
|
+
|
|
564
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;
|
|
565
592
|
cursor: help;
|
|
566
593
|
pointer-events: auto;
|
|
567
594
|
color: red;
|
|
568
595
|
}
|
|
569
596
|
|
|
570
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;
|
|
571
601
|
cursor: help;
|
|
572
602
|
pointer-events: auto;
|
|
573
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
|
+
// }
|
|
574
614
|
}
|
|
575
615
|
}
|
|
576
616
|
|
|
@@ -580,14 +620,27 @@ form.semanticForms, form.semanticForms.light {
|
|
|
580
620
|
|
|
581
621
|
label {
|
|
582
622
|
user-select: auto;
|
|
583
|
-
color: var(--
|
|
623
|
+
color: var(--semanticFormsTextColor);
|
|
624
|
+
font-size: var(--semanticFormsInputFontSize);
|
|
584
625
|
position: absolute;
|
|
585
626
|
transform-origin: left center;
|
|
586
627
|
transform: translateY(-100%) scale(0.7);
|
|
587
|
-
top: var(--
|
|
628
|
+
top: var(--semanticFormsInputTopMargin);
|
|
588
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
|
+
// }
|
|
589
640
|
|
|
590
641
|
span.help {
|
|
642
|
+
// TODO: remove this? // position: absolute;
|
|
643
|
+
// right: 0;
|
|
591
644
|
cursor: help;
|
|
592
645
|
pointer-events: auto;
|
|
593
646
|
}
|
|
@@ -596,7 +649,14 @@ form.semanticForms, form.semanticForms.light {
|
|
|
596
649
|
|
|
597
650
|
&:has(dd input:required) {
|
|
598
651
|
dt {
|
|
652
|
+
label {
|
|
653
|
+
width: 100%;
|
|
654
|
+
padding-right:10px;
|
|
655
|
+
}
|
|
656
|
+
|
|
599
657
|
label > span {
|
|
658
|
+
// TODO: remove this? // position: absolute;
|
|
659
|
+
// right: 0;
|
|
600
660
|
margin-left: 5px;
|
|
601
661
|
cursor: help;
|
|
602
662
|
pointer-events: auto;
|
|
@@ -609,7 +669,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
609
669
|
|
|
610
670
|
input, textarea {
|
|
611
671
|
&::placeholder {
|
|
612
|
-
color: var(--
|
|
672
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
613
673
|
opacity: 1;
|
|
614
674
|
}
|
|
615
675
|
}
|
|
@@ -657,33 +717,33 @@ form.semanticForms, form.semanticForms.light {
|
|
|
657
717
|
|
|
658
718
|
fieldset.colspan-full dl,
|
|
659
719
|
dl.colspan-full {
|
|
660
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--
|
|
720
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
661
721
|
}
|
|
662
722
|
|
|
663
723
|
fieldset.colspan-5 dl,
|
|
664
724
|
dl.colspan-5 {
|
|
665
|
-
grid-template-columns: repeat(5, minmax(var(--
|
|
725
|
+
grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
666
726
|
}
|
|
667
727
|
|
|
668
728
|
fieldset.colspan-4 dl,
|
|
669
729
|
dl.colspan-4 {
|
|
670
|
-
grid-template-columns: repeat(4, minmax(var(--
|
|
730
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
671
731
|
}
|
|
672
732
|
|
|
673
733
|
|
|
674
734
|
fieldset.colspan-3 dl,
|
|
675
735
|
dl.colspan-3 {
|
|
676
|
-
grid-template-columns: repeat(3, minmax(var(--
|
|
736
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
677
737
|
}
|
|
678
738
|
|
|
679
739
|
fieldset.colspan-2 dl,
|
|
680
740
|
dl.colspan-2 {
|
|
681
|
-
grid-template-columns: repeat(2, minmax(var(--
|
|
741
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
682
742
|
}
|
|
683
743
|
|
|
684
744
|
fieldset.colspan-1 dl,
|
|
685
745
|
dl.colspan-1 {
|
|
686
|
-
grid-template-columns: repeat(1, minmax(var(--
|
|
746
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
687
747
|
}
|
|
688
748
|
// #endregion
|
|
689
749
|
|
|
@@ -692,7 +752,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
692
752
|
@container semanticForm (width > 2250px) {
|
|
693
753
|
&.lowFlow fieldset dl,
|
|
694
754
|
&.lowFlow dl {
|
|
695
|
-
grid-template-columns: repeat(6, minmax(var(--
|
|
755
|
+
grid-template-columns: repeat(6, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
696
756
|
|
|
697
757
|
& dt:nth-of-type(6n + 1),
|
|
698
758
|
& dd:nth-of-type(6n + 1) {
|
|
@@ -729,7 +789,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
729
789
|
@container semanticForm (width < 2250px) {
|
|
730
790
|
&.lowFlow fieldset dl,
|
|
731
791
|
&.lowFlow dl {
|
|
732
|
-
grid-template-columns: repeat(5, minmax(var(--
|
|
792
|
+
grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
733
793
|
|
|
734
794
|
& dt:nth-of-type(5n + 1),
|
|
735
795
|
& dd:nth-of-type(5n + 1) {
|
|
@@ -761,7 +821,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
761
821
|
@container semanticForm (width < 1300px) {
|
|
762
822
|
fieldset.colspan-5 dl,
|
|
763
823
|
dl.colspan-5 {
|
|
764
|
-
grid-template-columns: repeat(4, minmax(var(--
|
|
824
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
765
825
|
}
|
|
766
826
|
|
|
767
827
|
div.colspan-5 {
|
|
@@ -772,7 +832,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
772
832
|
&.lowFlow dl,
|
|
773
833
|
&.lowFlow fieldset.colspan-5 dl,
|
|
774
834
|
&.lowFlow dl.colspan-5 {
|
|
775
|
-
grid-template-columns: repeat(4, minmax(var(--
|
|
835
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
776
836
|
|
|
777
837
|
& dt:nth-of-type(4n + 1),
|
|
778
838
|
& dd:nth-of-type(4n + 1) {
|
|
@@ -801,7 +861,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
801
861
|
fieldset.colspan-5 dl,
|
|
802
862
|
dl.colspan-4,
|
|
803
863
|
dl.colspan-5 {
|
|
804
|
-
grid-template-columns: repeat(3, minmax(var(--
|
|
864
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
805
865
|
}
|
|
806
866
|
|
|
807
867
|
div.colspan-4, div.colspan-5 {
|
|
@@ -814,7 +874,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
814
874
|
&.lowFlow dl.colspan-4,
|
|
815
875
|
&.lowFlow fieldset.colspan-5 dl,
|
|
816
876
|
&.lowFlow dl.colspan-5 {
|
|
817
|
-
grid-template-columns: repeat(3, minmax(var(--
|
|
877
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
818
878
|
|
|
819
879
|
& dt:nth-of-type(3n + 1),
|
|
820
880
|
& dd:nth-of-type(3n + 1) {
|
|
@@ -840,7 +900,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
840
900
|
dl.colspan-3,
|
|
841
901
|
dl.colspan-4,
|
|
842
902
|
dl.colspan-5 {
|
|
843
|
-
grid-template-columns: repeat(2, minmax(var(--
|
|
903
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
844
904
|
}
|
|
845
905
|
|
|
846
906
|
div.colspan-3,
|
|
@@ -857,7 +917,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
857
917
|
&.lowFlow dl.colspan-4,
|
|
858
918
|
&.lowFlow fieldset.colspan-5 dl,
|
|
859
919
|
&.lowFlow dl.colspan-5 {
|
|
860
|
-
grid-template-columns: repeat(2, minmax(var(--
|
|
920
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
861
921
|
|
|
862
922
|
& dt:nth-of-type(2n + 1),
|
|
863
923
|
& dd:nth-of-type(2n + 1) {
|
|
@@ -881,7 +941,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
881
941
|
dl.colspan-4,
|
|
882
942
|
dl.colspan-5,
|
|
883
943
|
dl {
|
|
884
|
-
grid-template-columns: repeat(1, minmax(var(--
|
|
944
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
|
|
885
945
|
}
|
|
886
946
|
|
|
887
947
|
div.colspan-2, div.colspan-3, div.colspan-4, div.colspan-5 {
|
|
@@ -898,7 +958,7 @@ form.semanticForms, form.semanticForms.light {
|
|
|
898
958
|
&.lowFlow dl.colspan-4,
|
|
899
959
|
&.lowFlow fieldset.colspan-5 dl,
|
|
900
960
|
&.lowFlow dl.colspan-5 {
|
|
901
|
-
grid-template-columns: repeat(1, minmax(var(--
|
|
961
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
902
962
|
|
|
903
963
|
& dt:nth-of-type(n + 1),
|
|
904
964
|
& dd:nth-of-type(n + 1) {
|
|
@@ -951,14 +1011,14 @@ form.semanticForms, form.semanticForms.light {
|
|
|
951
1011
|
label {
|
|
952
1012
|
margin-top: -5px;
|
|
953
1013
|
font-size: small;
|
|
954
|
-
color: var(--
|
|
1014
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
955
1015
|
}
|
|
956
1016
|
}
|
|
957
1017
|
}
|
|
958
1018
|
|
|
959
1019
|
.checkboxes ul,
|
|
960
1020
|
.radios ul {
|
|
961
|
-
margin-top: calc(var(--
|
|
1021
|
+
margin-top: calc(var(--semanticFormsInputTopMargin) / 2);
|
|
962
1022
|
}
|
|
963
1023
|
}
|
|
964
1024
|
// #endregion
|