semantic-forms 5.1.12 → 5.2.1

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.
@@ -14,12 +14,14 @@ form.semanticForms, form.semanticForms.light, table.semanticForms {
14
14
  --semanticFormsButtonGradientDark: #c0c0c0;
15
15
  --semanticFormsInvalid: #f00;
16
16
  --semanticFormsInvalidBorder: 1px solid var(--semanticFormsInvalid);
17
+ --semanticFormsWarn: #ffdd00;
18
+ --semanticFormsWarnBorder: 1px solid var(--semanticFormsWarn);
17
19
  --semanticFormsInputHeight: 38px;
18
20
  --semanticFormsInputFontSize: 16px;
19
21
  --semanticFormsInputTopMargin: 15px;
20
22
  --semanticFormsInputMinWidth: 250px;
21
23
  --semanticFormsBorderRadius: 10px;
22
- --semanticFormsNestedFieldsetBgColor: rgba(0, 0, 0, .05);
24
+ --semanticFormsNestedFieldsetBgColor: oklch(from var(--semanticFormsFormSubBgColor) 0.3 c h / 0.05);
23
25
  --semanticFormsNestedFieldsetBorder: 1px rgba(0, 0, 0, .2) solid;
24
26
  --semanticFormsNestedInputBgColor: #fff;
25
27
  --semanticFormsBorder: 1px var(--semanticFormsBorderColor) solid;
@@ -45,7 +47,7 @@ form.semanticForms, form.semanticForms.light, table.semanticForms {
45
47
  --semanticFormsClearButtonColor: #fff;
46
48
  --semanticFormsButtonGradientLight: #6f6f6f;
47
49
  --semanticFormsButtonGradientDark: #373737;
48
- --semanticFormsNestedFieldsetBgColor: rgba(255, 255, 255, .05);
50
+ --semanticFormsNestedFieldsetBgColor: oklch(from var(--semanticFormsFormSubBgColor) 0.9 c h / 0.05);
49
51
  --semanticFormsNestedFieldsetBorder: 1px rgba(255, 255, 255, .1) solid;
50
52
  --semanticFormsNestedInputBgColor: rgba(255, 255, 255, .15);
51
53
  --semanticFormsBorder: none;
@@ -93,10 +95,9 @@ table.semanticForms.light {
93
95
  font-family: var(--semanticFormsFontFamily);
94
96
  font-size: var(--semanticFormsFontSize);
95
97
  width: 100%;
96
- container-type: inline-size;
97
- container-name: semanticForm;
98
98
 
99
- @supports (interpolate-size: allow-keywords) { // https://caniuse.com/wf-interpolate-size
99
+ // https://caniuse.com/wf-interpolate-size
100
+ @supports (interpolate-size: allow-keywords) {
100
101
  interpolate-size: allow-keywords;
101
102
  }
102
103
 
@@ -137,6 +138,11 @@ table.semanticForms.light {
137
138
  }
138
139
 
139
140
  // #region input styling
141
+ input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
142
+ select {
143
+ height: var(--semanticFormsInputHeight);
144
+ }
145
+
140
146
  input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
141
147
  select,
142
148
  textarea {
@@ -148,23 +154,71 @@ table.semanticForms.light {
148
154
  touch-action: manipulation;
149
155
  outline: none;
150
156
 
151
- &:not([type="range"]):placeholder-shown {
152
- padding: 6px 20px;
153
- }
154
-
155
157
  &:not([type="range"]) {
156
158
  padding: 6px 30px 6px 20px;
157
159
  }
158
160
 
161
+ // custom focus highlight
162
+ input:not([type='submit'], [type='reset'], [type='image']),
163
+ select,
164
+ textarea {
165
+ &:focus {
166
+ outline: none;
167
+ box-shadow: 0 0 0 1px var(--semanticFormsBorderColor);
168
+ }
169
+ }
170
+
171
+ // input type styling
159
172
  &[type="password"], &[type="text"]:has(~ button.show) {
160
173
  padding: 6px 55px 6px 20px;
161
174
  }
162
175
 
176
+ &[type="search"] {
177
+ padding: 6px 20px 6px 32px;
178
+ background: var(--semanticFormsSearchIcon) no-repeat 10px;
179
+ background-color: var(--semanticFormsFormBgColor);
180
+ background-size: 18px;
181
+
182
+ &:focus,
183
+ &:not(:placeholder-shown) {
184
+ & + label.floatLabelFormAnimatedLabel {
185
+ left: 20px;
186
+ }
187
+ }
188
+
189
+ // hide native cancel button
190
+ &::-webkit-search-cancel-button {
191
+ display: none;
192
+ }
193
+ }
194
+
195
+ &[type="checkbox"],
196
+ &[type="radio"] {
197
+ width: 18px;
198
+ height: 18px;
199
+ margin: 3px 0;
200
+ cursor: pointer;
201
+
202
+ & ~ label:first-of-type {
203
+ color: var(--semanticFormsTextColor);
204
+ }
205
+ }
206
+
163
207
  &[type="range"],
164
208
  &[type="color"] {
165
209
  cursor: pointer;
166
210
  }
167
211
 
212
+ &[type="color"] {
213
+ height: var(--semanticFormsInputHeight);
214
+ padding: 4px 30px 4px 10px;
215
+ }
216
+
217
+ &[type="file"] {
218
+ cursor: pointer;
219
+ font-size: var(--semanticFormsInputFontSize);
220
+ }
221
+
168
222
  &[disabled] {
169
223
  cursor: not-allowed;
170
224
  opacity: 0.5;
@@ -179,50 +233,10 @@ table.semanticForms.light {
179
233
  }
180
234
  }
181
235
 
182
- // focused styles
183
- input:not([type='submit'], [type='reset'], [type='image']),
184
- select,
185
- textarea {
186
- // custom focus highlight
187
- &:focus {
188
- outline: none;
189
- box-shadow: 0 0 0 1px var(--semanticFormsBorderColor);
190
- }
191
- }
192
-
193
- input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
194
- select {
195
- height: var(--semanticFormsInputHeight);
196
- }
197
-
198
- // specific styling for color input
199
- input[type=color] {
200
- height: var(--semanticFormsInputHeight);
201
- padding: 4px !important;
202
- padding-right: 30px !important;
203
- }
204
-
205
- input[type=checkbox],
206
- input[type=radio] {
207
- // 30% larger based on parent font size
208
- width: 1.4em;
209
- height: 1.4em;
210
- margin: 3px 0;
211
- cursor: pointer;
212
-
213
- & ~ label:first-of-type {
214
- color: var(--semanticFormsTextColor) !important;
215
- }
216
- }
217
-
218
- input[type=file] {
219
- cursor: pointer;
220
- font-size: var(--semanticFormsInputFontSize);
221
- }
222
-
223
236
  select {
224
237
  cursor: pointer;
225
238
 
239
+ // single selects
226
240
  &:not([multiple]) {
227
241
  // custom dropdown graphic on select element
228
242
  background-image: var(--semanticFormsSelectIcon);
@@ -234,10 +248,11 @@ table.semanticForms.light {
234
248
  appearance: none;
235
249
  }
236
250
 
251
+ // multi-selects
237
252
  &[multiple] {
238
253
  min-height: 38px;
239
254
  height: 100px;
240
- padding: 0 !important;
255
+ padding: 0;
241
256
 
242
257
  option {
243
258
  padding: 6px 20px;
@@ -263,29 +278,6 @@ table.semanticForms.light {
263
278
  field-sizing: content;
264
279
  }
265
280
  }
266
-
267
- input[type="search"] {
268
- background: var(--semanticFormsSearchIcon) no-repeat 10px;
269
- background-color: var(--semanticFormsFormBgColor);
270
- background-size: 18px;
271
- padding-left: 32px !important; // shift values to the right
272
-
273
- & + label.floatLabelFormAnimatedLabel {
274
- left: 32px !important; // override float label
275
- }
276
-
277
- &:focus,
278
- &:not(:placeholder-shown) {
279
- & + label.floatLabelFormAnimatedLabel {
280
- left: 20px !important;
281
- }
282
- }
283
-
284
- // hide native cancel button
285
- &::-webkit-search-cancel-button {
286
- display: none;
287
- }
288
- }
289
281
  // #endregion
290
282
 
291
283
  // #region buttons
@@ -330,7 +322,7 @@ table.semanticForms.light {
330
322
  // button styling
331
323
  input[type='submit'],
332
324
  input[type='reset'],
333
- button:not(.clear):not(.show),
325
+ button:not(.clear, .show),
334
326
  .button-link {
335
327
  appearance: none;
336
328
  -moz-appearance: none;
@@ -373,7 +365,7 @@ table.semanticForms.light {
373
365
 
374
366
  &:visited,
375
367
  &:link {
376
- color: var(--semanticFormsTextColor) !important;
368
+ color: var(--semanticFormsTextColor);
377
369
  }
378
370
  }
379
371
  // #endregion
@@ -389,10 +381,10 @@ table.semanticForms.light {
389
381
  textarea {
390
382
  &.invalid,
391
383
  &:user-invalid {
392
- border: var(--semanticFormsInvalidBorder) !important;
384
+ border: var(--semanticFormsInvalidBorder);
393
385
 
394
386
  ~ label:nth-of-type(2) {
395
- color: var(--semanticFormsInvalid) !important;
387
+ color: var(--semanticFormsInvalid);
396
388
  }
397
389
 
398
390
  ~ [data-invalid-text] {
@@ -401,6 +393,18 @@ table.semanticForms.light {
401
393
  }
402
394
  }
403
395
 
396
+ &.warn {
397
+ border: var(--semanticFormsWarnBorder);
398
+
399
+ ~ label:nth-of-type(2) {
400
+ color: var(--semanticFormsWarn);
401
+ }
402
+
403
+ ~ [data-invalid-text] {
404
+ font-size: small;
405
+ display: flex;
406
+ }
407
+ }
404
408
  }
405
409
  // #endregion
406
410
 
@@ -423,6 +427,7 @@ table.semanticForms.light {
423
427
  transition-property: background-color, color;
424
428
  }
425
429
 
430
+ // #region fieldset
426
431
  fieldset {
427
432
  border-radius: var(--semanticFormsBorderRadius);
428
433
  background: var(--semanticFormsFormSubBgColor);
@@ -446,12 +451,13 @@ table.semanticForms.light {
446
451
  }
447
452
  }
448
453
  }
454
+ // #endregion
449
455
 
450
456
  // #region details
451
457
  details {
452
458
  box-sizing: border-box; // ensure sizings match across browsers
453
459
  position: relative;
454
- background-color: var(--semanticFormsNestedFieldsetBgColor); // TODO: check if this is right
460
+ background-color: var(--semanticFormsNestedFieldsetBgColor);
455
461
  border: var(--semanticFormsNestedFieldsetBorder);
456
462
  border-radius: var(--semanticFormsBorderRadius);
457
463
  display: flex;
@@ -525,6 +531,10 @@ table.semanticForms.light {
525
531
  transform: rotate(90deg);
526
532
  }
527
533
  }
534
+
535
+ & > dl:first-of-type {
536
+ margin-top: 15px;
537
+ }
528
538
  }
529
539
  }
530
540
 
@@ -554,7 +564,6 @@ table.semanticForms.light {
554
564
  }
555
565
 
556
566
  // #region container layout
557
-
558
567
  dl:has(dt > label, dd > input, dd > select, dd > textarea) {
559
568
  display: grid;
560
569
  grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
@@ -563,104 +572,117 @@ table.semanticForms.light {
563
572
 
564
573
  dd {
565
574
  position: relative;
575
+ display: flex;
576
+ flex-direction: column;
577
+ gap: 10px;
578
+ max-width: 100%;
566
579
 
567
- &.checkboxes, &.radios {
568
- display: flex;
569
- flex-direction: column;
570
- gap: 10px;
580
+ // checkbox/radio
581
+ &.singleCheckbox,
582
+ &.singleRadio {
583
+ display: grid;
584
+ grid-template-columns: 15px 1fr;
585
+ align-items: center;
586
+ padding-left: 11px;
587
+
588
+ // anything that is not the radio/checkbox and its label
589
+ & > :not(input[type='checkbox'], input[type='radio'], label) {
590
+ grid-column: 1 / -1;
591
+ }
571
592
 
572
- // checkbox subtext
573
- & > label {
574
- padding-left: 20px;
593
+ // additional label takes up entire width
594
+ label:nth-of-type(2) {
595
+ grid-column: 1 / -1;
596
+ padding: 0 10px;
575
597
  font-size: small;
576
598
  color: var(--semanticFormsTextColor);
577
599
  }
578
600
  }
579
601
 
580
- &:not(.checkboxes, .radios) {
581
- gap: 10px;
582
- max-width: 100%;
602
+ &.singleRadio > input {
603
+ margin: 0;
604
+ }
583
605
 
584
- // places all items within the <dd> vertically
585
- &:not(.singleCheckbox, .singleRadio) {
606
+ // checkbox/radio groups
607
+ &.checkboxes, &.radios {
608
+ ul {
586
609
  display: flex;
587
610
  flex-direction: column;
611
+ margin-top: var(--semanticFormsInputTopMargin);
612
+ padding-left: 10px;
613
+ gap: 5px;
588
614
 
589
- // unless there is a button present, which will be placed beside the input
590
- &:has(button:not(.clear, .show), input[type="submit"]:not(.clear, .show)) {
591
- display: grid;
592
- grid-template-columns: 2fr 1fr;
615
+ li {
616
+ display: flex;
617
+ align-items: center;
618
+ gap: 5px;
619
+ }
620
+ }
593
621
 
594
- button.clear, button.show {
595
- right: 36%; // adjust clear/show button to grid
596
- }
622
+ // checkbox subtext
623
+ & > label {
624
+ padding-left: 20px;
625
+ font-size: small;
626
+ color: var(--semanticFormsTextColor);
627
+ }
628
+ }
597
629
 
598
- input:not([type="submit"]), select, textarea {
599
- grid-row: 1 / 2;
600
- grid-column: 1 / 2;
601
- }
630
+ // place buttons next to input
631
+ &:has(button:not(.clear, .show), input[type="submit"]:not(.clear, .show)) {
632
+ display: grid;
633
+ grid-template-columns: 2fr 1fr;
602
634
 
603
- button:not(.clear, .show),
604
- input[type="submit"]:not(.clear, .show) {
605
- grid-row: 1 / 2;
606
- grid-column: 2 / 3;
607
- width: 100%;
608
- max-width: 100%;
609
- padding: 10px; // reduce default padding to allow more button text to show
610
- margin-top: var(--semanticFormsInputTopMargin);
611
- height: var(--semanticFormsInputHeight);
612
- text-overflow: ellipsis;
613
- white-space: nowrap;
614
- overflow: hidden;
615
- display: inline-block;
616
- }
635
+ button.clear, button.show {
636
+ right: 36%; // adjust clear/show button to grid
637
+ }
617
638
 
618
- // TODO: handle help text as well (will need to be grid-columns: 0 2 or whatever it is)
619
- label:nth-of-type(2) {
620
- grid-row: 2 / 3;
621
- grid-column: 1 / -1;
622
- }
623
- }
639
+ input:not([type="submit"]), select, textarea {
640
+ grid-row: 1 / 2;
641
+ grid-column: 1 / 2;
624
642
  }
625
643
 
626
- &.singleCheckbox,
627
- &.singleRadio {
628
- display: grid;
629
- grid-template-columns: 15px 1fr;
630
- align-items: center;
631
- padding-left: 11px;
644
+ button:not(.clear, .show),
645
+ input[type="submit"]:not(.clear, .show),
646
+ input[type="button"]:not(.clear, .show) {
647
+ grid-row: 1 / 2;
648
+ grid-column: 2 / 3;
649
+ width: 100%;
650
+ max-width: 100%;
651
+ padding: 10px; // reduce default padding to allow more button text to show
652
+ height: var(--semanticFormsInputHeight);
653
+ text-overflow: ellipsis;
654
+ white-space: nowrap;
655
+ overflow: hidden;
656
+ display: inline-block;
657
+ }
632
658
 
633
- & > :not(input[type='checkbox'], input[type='radio'], label) {
634
- grid-column: 1 / -1;
635
- }
659
+ label:nth-of-type(2),
660
+ label:not(.floatLabelFormAnimatedLabel) {
661
+ grid-row: 2 / 3;
662
+ grid-column: 1 / -1;
663
+ }
664
+ }
636
665
 
637
- // single checkbox subtext
638
- label:nth-of-type(2) {
639
- grid-column: 1 / -1;
640
- padding: 0 10px;
641
- font-size: small;
642
- color: var(--semanticFormsTextColor);
643
- }
666
+ // focus-key styles
667
+ &:has(span.focus-key) {
668
+ // make room for focus key span
669
+ label:first-of-type {
670
+ width: calc(100% - 95px);
644
671
  }
645
672
 
646
- &.singleRadio {
647
- input {
648
- margin: 0;
673
+ span.focus-key {
674
+ display: block;
675
+
676
+ kbd {
677
+ font-family: sans-serif;
649
678
  }
650
679
  }
651
- }
652
680
 
653
- &.checkboxes ul, &.radios ul {
654
- display: flex;
655
- flex-direction: column;
656
- margin-top: var(--semanticFormsInputTopMargin);
657
- padding-left: 10px;
658
- gap: 5px;
659
-
660
- li {
661
- display: flex;
662
- align-items: center;
663
- gap: 5px;
681
+ &:has(input:focus, select:focus, textarea:focus),
682
+ &:not(:has(input:placeholder-shown, textarea:placeholder-shown)) {
683
+ span.focus-key {
684
+ display: none;
685
+ }
664
686
  }
665
687
  }
666
688
  }
@@ -739,7 +761,7 @@ table.semanticForms.light {
739
761
  textarea {
740
762
  &:focus:not([type=checkbox], [type=radio], .no-float-label) ~ label:first-of-type,
741
763
  &:not(:placeholder-shown):not(.no-float-label):not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
742
- color: var(--semanticFormsTextColor) !important;
764
+ color: var(--semanticFormsTextColor);
743
765
  transform: translateY(-150%) scale(0.7);
744
766
  width: 100%;
745
767
  }
@@ -757,18 +779,26 @@ table.semanticForms.light {
757
779
 
758
780
  select ~ label:first-of-type {
759
781
  // force label to be correct color
760
- color: var(--semanticFormsTextColor) !important;
782
+ color: var(--semanticFormsTextColor);
783
+ }
784
+
785
+ button:not(.clear, .show),
786
+ input[type=submit]:not(.clear, .show) {
787
+ margin-top: var(--semanticFormsInputTopMargin);
761
788
  }
762
789
 
790
+ // input label
763
791
  label:first-of-type {
792
+ position: absolute;
793
+ top: calc(var(--semanticFormsInputTopMargin) + 10px);
794
+ left: 20px;
795
+ display: flex;
796
+ align-items: center;
797
+ gap: 5px;
764
798
  line-height: 1.2;
765
799
  font-size: var(--semanticFormsInputFontSize);
766
- position: absolute;
767
800
  transform-origin: left center;
768
801
  pointer-events: none;
769
- // when the label is positioned within the input it needs a buffer
770
- top: calc(var(--semanticFormsInputTopMargin) + 10px);
771
- left: 20px;
772
802
  transition: transform 250ms;
773
803
  cursor: text;
774
804
  flex: 1;
@@ -777,9 +807,29 @@ table.semanticForms.light {
777
807
  text-overflow: ellipsis;
778
808
  min-width: 0;
779
809
  width: calc(100% - 35px);
810
+ user-select: none;
811
+ color: var(--semanticFormsPlaceholderColor);
812
+ touch-action: manipulation;
813
+
814
+ span.required {
815
+ cursor: help;
816
+ pointer-events: auto;
817
+ color: red;
818
+ }
819
+
820
+ span.help {
821
+ display: grid;
822
+ place-items: center;
823
+ cursor: help;
824
+ pointer-events: auto;
825
+
826
+ svg {
827
+ width: 80%;
828
+ }
829
+ }
780
830
  }
781
831
 
782
- // subtext
832
+ // subtext label
783
833
  label:nth-of-type(2) {
784
834
  margin-top: -5px;
785
835
  padding: 0 10px;
@@ -796,6 +846,7 @@ table.semanticForms.light {
796
846
  input,
797
847
  textarea {
798
848
  transition: opacity 250ms;
849
+
799
850
  // hide placeholder content until input is focused
800
851
  &::placeholder {
801
852
  opacity: 0;
@@ -837,29 +888,27 @@ table.semanticForms.light {
837
888
  }
838
889
  }
839
890
 
840
- label:first-of-type {
841
- user-select: none;
891
+ // keyboard shortcut indicator
892
+ span.focus-key {
842
893
  color: var(--semanticFormsPlaceholderColor);
843
- touch-action: manipulation;
844
- display: flex;
845
- align-items: center;
846
- gap: 5px;
894
+ position: absolute;
895
+ top: calc(var(--semanticFormsInputTopMargin) + 11px);
896
+ right: 20px;
847
897
 
848
- span.required {
849
- cursor: help;
850
- pointer-events: auto;
851
- color: red;
898
+ kbd {
899
+ line-height: 1;
852
900
  }
901
+ }
853
902
 
854
- span.help {
855
- display: grid;
856
- place-items: center;
857
- cursor: help;
858
- pointer-events: auto;
903
+ &:has(input[type="number"]) {
904
+ .focus-key {
905
+ right: 45px;
906
+ }
907
+ }
859
908
 
860
- svg {
861
- width: 80%;
862
- }
909
+ &:has(input[type="search"]) {
910
+ label:first-of-type {
911
+ left: 32px;
863
912
  }
864
913
  }
865
914
  }
@@ -939,362 +988,325 @@ table.semanticForms.light {
939
988
  // #endregion
940
989
  }
941
990
 
942
- &.semanticFormsActive {
943
- // #region colspan classes
991
+ // #region colspan classes
992
+ div {
993
+ &[class^='colspan-'] {
994
+ max-width: 100%;
995
+ }
996
+
997
+ &.colspan-full {
998
+ grid-column: 1 / -1;
999
+ }
1000
+
1001
+ &.colspan-5 {
1002
+ grid-column: span 5;
1003
+ }
1004
+
1005
+ &.colspan-4 {
1006
+ grid-column: span 4;
1007
+ }
1008
+
1009
+ &.colspan-3 {
1010
+ grid-column: span 3;
1011
+ }
1012
+
1013
+ &.colspan-2 {
1014
+ grid-column: span 2;
1015
+ }
1016
+
1017
+ &.colspan-1 {
1018
+ grid-column: span 1;
1019
+ }
1020
+ }
1021
+
1022
+ fieldset[class^='colspan-'] dl,
1023
+ dl[class^='colspan-'] {
944
1024
  div {
945
- &[class^='colspan-'] {
946
- max-width: 100%;
947
- }
1025
+ max-width: 100%;
1026
+ }
1027
+ }
948
1028
 
949
- &.colspan-full {
950
- grid-column: 1 / -1;
951
- }
1029
+ fieldset.colspan-full dl,
1030
+ dl.colspan-full {
1031
+ grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
1032
+ }
952
1033
 
953
- &.colspan-5 {
954
- grid-column: span 5;
955
- }
1034
+ fieldset.colspan-5 dl,
1035
+ dl.colspan-5 {
1036
+ grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
1037
+ }
956
1038
 
957
- &.colspan-4 {
958
- grid-column: span 4;
959
- }
1039
+ fieldset.colspan-4 dl,
1040
+ dl.colspan-4 {
1041
+ grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
1042
+ }
960
1043
 
961
- &.colspan-3 {
962
- grid-column: span 3;
963
- }
1044
+ fieldset.colspan-3 dl,
1045
+ dl.colspan-3 {
1046
+ grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
1047
+ }
964
1048
 
965
- &.colspan-2 {
966
- grid-column: span 2;
967
- }
1049
+ fieldset.colspan-2 dl,
1050
+ dl.colspan-2 {
1051
+ grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
1052
+ }
968
1053
 
969
- &.colspan-1 {
970
- grid-column: span 1;
971
- }
1054
+ fieldset.colspan-1 dl,
1055
+ dl.colspan-1 {
1056
+ grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
1057
+ }
1058
+
1059
+ fieldset.colspan-1 dl,
1060
+ dl.colspan-1 {
1061
+ dt:nth-of-type(n + 1),
1062
+ dd:nth-of-type(n + 1) {
1063
+ grid-column: 1;
972
1064
  }
1065
+ }
973
1066
 
974
- fieldset[class^='colspan-'] dl,
975
- dl[class^='colspan-'] {
976
- div {
977
- max-width: 100%;
978
- }
1067
+ fieldset.colspan-2 dl,
1068
+ dl.colspan-2 {
1069
+ dt:nth-of-type(2n + 1),
1070
+ dd:nth-of-type(2n + 1) {
1071
+ grid-column: 1;
979
1072
  }
980
1073
 
981
- fieldset.colspan-full dl,
982
- dl.colspan-full {
983
- grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
1074
+ dt:nth-of-type(2n + 2),
1075
+ dd:nth-of-type(2n + 2) {
1076
+ grid-column: 2;
984
1077
  }
1078
+ }
985
1079
 
986
- fieldset.colspan-5 dl,
987
- dl.colspan-5 {
988
- grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
1080
+ fieldset.colspan-3 dl,
1081
+ dl.colspan-3 {
1082
+ dt:nth-of-type(3n + 1),
1083
+ dd:nth-of-type(3n + 1) {
1084
+ grid-column: 1;
989
1085
  }
990
1086
 
991
- fieldset.colspan-4 dl,
992
- dl.colspan-4 {
993
- grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
1087
+ dt:nth-of-type(3n + 2),
1088
+ dd:nth-of-type(3n + 2) {
1089
+ grid-column: 2;
994
1090
  }
995
1091
 
1092
+ dt:nth-of-type(3n + 3),
1093
+ dd:nth-of-type(3n + 3) {
1094
+ grid-column: 3;
1095
+ }
1096
+ }
996
1097
 
997
- fieldset.colspan-3 dl,
998
- dl.colspan-3 {
999
- grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
1098
+ fieldset.colspan-4 dl,
1099
+ dl.colspan-4 {
1100
+ dt:nth-of-type(4n + 1),
1101
+ dd:nth-of-type(4n + 1) {
1102
+ grid-column: 1;
1000
1103
  }
1001
1104
 
1002
- fieldset.colspan-2 dl,
1003
- dl.colspan-2 {
1004
- grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
1105
+ dt:nth-of-type(4n + 2),
1106
+ dd:nth-of-type(4n + 2) {
1107
+ grid-column: 2;
1005
1108
  }
1006
1109
 
1007
- fieldset.colspan-1 dl,
1008
- dl.colspan-1 {
1009
- grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
1110
+ dt:nth-of-type(4n + 3),
1111
+ dd:nth-of-type(4n + 3) {
1112
+ grid-column: 3;
1010
1113
  }
1011
- // #endregion
1012
1114
 
1013
- // #region container queries
1014
- // The container is the <fieldset> element
1015
- @container semanticForm (width > 2250px) {
1016
- &.lowFlow fieldset dl,
1017
- &.lowFlow dl {
1018
- grid-template-columns: repeat(6, minmax(var(--semanticFormsInputMinWidth), 1fr));
1115
+ dt:nth-of-type(4n + 4),
1116
+ dd:nth-of-type(4n + 4) {
1117
+ grid-column: 4;
1118
+ }
1119
+ }
1019
1120
 
1020
- & dt:nth-of-type(6n + 1),
1021
- & dd:nth-of-type(6n + 1) {
1022
- grid-column: 1;
1023
- }
1121
+ fieldset.colspan-5 dl,
1122
+ dl.colspan-5 {
1123
+ dt:nth-of-type(5n + 1),
1124
+ dd:nth-of-type(5n + 1) {
1125
+ grid-column: 1;
1126
+ }
1024
1127
 
1025
- & dt:nth-of-type(6n + 2),
1026
- & dd:nth-of-type(6n + 2) {
1027
- grid-column: 2;
1028
- }
1128
+ dt:nth-of-type(5n + 2),
1129
+ dd:nth-of-type(5n + 2) {
1130
+ grid-column: 2;
1131
+ }
1029
1132
 
1030
- & dt:nth-of-type(6n + 3),
1031
- & dd:nth-of-type(6n + 3) {
1032
- grid-column: 3;
1033
- }
1133
+ dt:nth-of-type(5n + 3),
1134
+ dd:nth-of-type(5n + 3) {
1135
+ grid-column: 3;
1136
+ }
1034
1137
 
1035
- & dt:nth-of-type(6n + 4),
1036
- & dd:nth-of-type(6n + 4) {
1037
- grid-column: 4;
1038
- }
1138
+ dt:nth-of-type(5n + 4),
1139
+ dd:nth-of-type(5n + 4) {
1140
+ grid-column: 4;
1141
+ }
1039
1142
 
1040
- & dt:nth-of-type(6n + 5),
1041
- & dd:nth-of-type(6n + 5) {
1042
- grid-column: 5;
1043
- }
1044
-
1045
- & dt:nth-of-type(6n + 6),
1046
- & dd:nth-of-type(6n + 6) {
1047
- grid-column: 6;
1048
- }
1049
- }
1143
+ dt:nth-of-type(5n + 5),
1144
+ dd:nth-of-type(5n + 5) {
1145
+ grid-column: 5;
1050
1146
  }
1147
+ }
1148
+ // #endregion
1051
1149
 
1052
- @container semanticForm (width < 2250px) {
1053
- &.lowFlow fieldset dl,
1054
- &.lowFlow dl {
1055
- grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
1056
-
1057
- & dt:nth-of-type(5n + 1),
1058
- & dd:nth-of-type(5n + 1) {
1059
- grid-column: 1;
1060
- }
1061
-
1062
- & dt:nth-of-type(5n + 2),
1063
- & dd:nth-of-type(5n + 2) {
1064
- grid-column: 2;
1065
- }
1150
+ // #region low flow form
1151
+ &.lowFlow,
1152
+ &:not(.semanticFormsActive) {
1153
+ gap: 10px;
1066
1154
 
1067
- & dt:nth-of-type(5n + 3),
1068
- & dd:nth-of-type(5n + 3) {
1069
- grid-column: 3;
1070
- }
1155
+ dl {
1156
+ grid-auto-flow: dense;
1157
+ gap: 0 10px;
1158
+ margin-bottom: 0px;
1159
+ }
1071
1160
 
1072
- & dt:nth-of-type(5n + 4),
1073
- & dd:nth-of-type(5n + 4) {
1074
- grid-column: 4;
1075
- }
1161
+ // 1, 4, 7, ...
1162
+ & > dt:nth-of-type(2n + 1),
1163
+ & > dd:nth-of-type(2n + 1) {
1164
+ grid-column: 1;
1165
+ }
1076
1166
 
1077
- & dt:nth-of-type(5n + 5),
1078
- & dd:nth-of-type(5n + 5) {
1079
- grid-column: 5;
1080
- }
1081
- }
1167
+ // 2, 5, 8, ...
1168
+ & > dt:nth-of-type(2n + 2),
1169
+ & > dd:nth-of-type(2n + 2) {
1170
+ grid-column: 2;
1082
1171
  }
1083
1172
 
1084
- @container semanticForm (width < 1300px) {
1085
- fieldset.colspan-5 dl,
1086
- dl.colspan-5 {
1087
- grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1088
- }
1173
+ dt {
1174
+ min-width: var(--semanticFormsInputMinWidth); /* this matches the max-width of js-enabled inputs */
1089
1175
 
1090
- div.colspan-5 {
1091
- grid-column: span 4 !important;
1176
+ label {
1177
+ position: absolute;
1178
+ display: block;
1179
+ height: 11px;
1180
+ transform: scale(0.7);
1181
+ transform-origin: left center;
1182
+ padding-left: 22px;
1183
+ margin-top: -1px;
1092
1184
  }
1093
1185
 
1094
- &.lowFlow fieldset dl,
1095
- &.lowFlow dl,
1096
- &.lowFlow fieldset.colspan-5 dl,
1097
- &.lowFlow dl.colspan-5 {
1098
- grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
1099
-
1100
- & dt:nth-of-type(4n + 1),
1101
- & dd:nth-of-type(4n + 1) {
1102
- grid-column: 1;
1103
- }
1104
-
1105
- & dt:nth-of-type(4n + 2),
1106
- & dd:nth-of-type(4n + 2) {
1107
- grid-column: 2;
1108
- }
1109
-
1110
- & dt:nth-of-type(4n + 3),
1111
- & dd:nth-of-type(4n + 3) {
1112
- grid-column: 3;
1113
- }
1114
-
1115
- & dt:nth-of-type(4n + 4),
1116
- & dd:nth-of-type(4n + 4) {
1117
- grid-column: 4;
1186
+ // add required asterisk
1187
+ &:has(+ dd input:required) {
1188
+ label::after {
1189
+ content: ' *';
1190
+ color: red;
1118
1191
  }
1119
1192
  }
1120
1193
  }
1121
1194
 
1122
- @container semanticForm (width < 1050px) {
1123
- fieldset.colspan-4 dl,
1124
- fieldset.colspan-5 dl,
1125
- dl.colspan-4,
1126
- dl.colspan-5 {
1127
- grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1128
- }
1129
-
1130
- div.colspan-4, div.colspan-5 {
1131
- grid-column: span 3 !important;
1132
- }
1133
-
1134
- &.lowFlow fieldset dl,
1135
- &.lowFlow dl,
1136
- &.lowFlow fieldset.colspan-4 dl,
1137
- &.lowFlow dl.colspan-4,
1138
- &.lowFlow fieldset.colspan-5 dl,
1139
- &.lowFlow dl.colspan-5 {
1140
- grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
1141
-
1142
- & dt:nth-of-type(3n + 1),
1143
- & dd:nth-of-type(3n + 1) {
1144
- grid-column: 1;
1145
- }
1146
-
1147
- & dt:nth-of-type(3n + 2),
1148
- & dd:nth-of-type(3n + 2) {
1149
- grid-column: 2;
1150
- }
1151
-
1152
- & dt:nth-of-type(3n + 3),
1153
- & dd:nth-of-type(3n + 3) {
1154
- grid-column: 3;
1195
+ // checkbox/radio groups
1196
+ dt {
1197
+ &:has(+ dd.checkboxes),
1198
+ &:has(+ dd.radios) {
1199
+ label {
1200
+ padding-left: 15px;
1155
1201
  }
1156
1202
  }
1157
1203
  }
1158
1204
 
1159
- @container semanticForm (width < 800px) {
1160
- fieldset.colspan-3 dl,
1161
- fieldset.colspan-4 dl,
1162
- fieldset.colspan-5 dl,
1163
- dl.colspan-3,
1164
- dl.colspan-4,
1165
- dl.colspan-5 {
1166
- grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1167
- }
1168
-
1169
- div.colspan-3,
1170
- div.colspan-4,
1171
- div.colspan-5 {
1172
- grid-column: span 2 !important;
1173
- }
1174
-
1175
- &.lowFlow fieldset dl,
1176
- &.lowFlow dl,
1177
- &.lowFlow fieldset.colspan-3 dl,
1178
- &.lowFlow dl.colspan-3,
1179
- &.lowFlow fieldset.colspan-4 dl,
1180
- &.lowFlow dl.colspan-4,
1181
- &.lowFlow fieldset.colspan-5 dl,
1182
- &.lowFlow dl.colspan-5 {
1183
- grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
1184
-
1185
- & dt:nth-of-type(2n + 1),
1186
- & dd:nth-of-type(2n + 1) {
1187
- grid-column: 1;
1205
+ // single checkbox label
1206
+ dt {
1207
+ &:not(:has(+ dd ul)){
1208
+ &:has(+ dd input[type=checkbox]) {
1209
+ label {
1210
+ transform: scale(1);
1211
+ margin-top: 0;
1212
+ margin-left: 8px;
1213
+ }
1188
1214
  }
1189
1215
 
1190
- & dt:nth-of-type(2n + 2),
1191
- & dd:nth-of-type(2n + 2) {
1192
- grid-column: 2;
1216
+ &:has(+ dd input[type=radio]) {
1217
+ label {
1218
+ transform: scale(1);
1219
+ margin-top: 0;
1220
+ margin-left: 8px;
1221
+ }
1193
1222
  }
1194
1223
  }
1195
- }
1224
+ }
1196
1225
 
1197
- @container semanticForm (width < 550px) {
1198
- fieldset.colspan-2 dl,
1199
- fieldset.colspan-3 dl,
1200
- fieldset.colspan-4 dl,
1201
- fieldset.colspan-5 dl,
1202
- dl.colspan-2,
1203
- dl.colspan-3,
1204
- dl.colspan-4,
1205
- dl.colspan-5,
1206
- dl {
1207
- grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1208
- }
1209
-
1210
- div.colspan-2, div.colspan-3, div.colspan-4, div.colspan-5 {
1211
- grid-column: span 1 !important;
1212
- }
1213
1226
 
1214
- &.lowFlow fieldset dl,
1215
- &.lowFlow dl,
1216
- &.lowFlow fieldset.colspan-2 dl,
1217
- &.lowFlow dl.colspan-2,
1218
- &.lowFlow fieldset.colspan-3 dl,
1219
- &.lowFlow dl.colspan-3,
1220
- &.lowFlow fieldset.colspan-4 dl,
1221
- &.lowFlow dl.colspan-4,
1222
- &.lowFlow fieldset.colspan-5 dl,
1223
- &.lowFlow dl.colspan-5 {
1224
- grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
1227
+ dd {
1228
+ // margin-bottom: 10px;
1229
+ margin-top: var(--semanticFormsInputTopMargin);
1230
+ margin-bottom: 10px;
1231
+ min-width: var(--semanticFormsInputMinWidth); /* this matches the max-width of js-enabled inputs */
1225
1232
 
1226
- & dt:nth-of-type(n + 1),
1227
- & dd:nth-of-type(n + 1) {
1228
- grid-column: 1;
1229
- }
1230
- }
1231
- }
1232
- // #endregion
1233
+ // checkbox/radio groups
1234
+ &.checkboxes,
1235
+ &.radios {
1236
+ margin-top: 0;
1233
1237
 
1234
- // #region low flow form
1235
- &.lowFlow {
1236
- gap: 5px;
1238
+ ul {
1239
+ input[type=radio] {
1240
+ margin-top: 3px;
1241
+ }
1237
1242
 
1238
- dl {
1239
- grid-auto-flow: dense;
1240
- }
1243
+ label {
1244
+ padding-top: 7px;
1245
+ padding-left: 0;
1246
+ font-size: var(--semanticFormsFontSize);
1247
+ }
1248
+ }
1241
1249
 
1242
- // 1, 4, 7, ...
1243
- & > dt:nth-of-type(2n + 1),
1244
- & > dd:nth-of-type(2n + 1) {
1245
- grid-column: 1;
1250
+ // additional text
1251
+ ul + label {
1252
+ margin-top: 0;
1253
+ font-size: small;
1254
+ }
1246
1255
  }
1247
1256
 
1248
- // 2, 5, 8, ...
1249
- & > dt:nth-of-type(2n + 2),
1250
- & > dd:nth-of-type(2n + 2) {
1251
- grid-column: 2;
1252
- }
1257
+ // single checkbox/radio
1258
+ &:not(:has(ul)){
1259
+ &:has(input[type=checkbox], input[type=radio]) {
1260
+ margin-top: 0;
1261
+ padding-left: 10px;
1262
+
1263
+ input[type=checkbox],
1264
+ input[type=radio] {
1265
+ margin-left: 1px;
1266
+ margin-top: 1px;
1267
+ margin-right: auto;
1268
+ }
1253
1269
 
1254
- dt {
1255
- min-width: var(--semanticFormsInputMinWidth) !important; /* this matches the max-width of js-enabled inputs */
1270
+ // additional info text
1271
+ label {
1272
+ font-size: small;
1273
+ margin-top: -1px;
1274
+ padding-left: 11px;
1275
+ }
1256
1276
 
1257
- // add required asterisk
1258
- &:has(+ dd input:required) {
1259
- label::after {
1260
- content: ' *';
1261
- color: red;
1277
+ input[type=radio] + label {
1278
+ margin-top: -4px;
1262
1279
  }
1263
1280
  }
1264
1281
  }
1265
1282
 
1283
+ // remove "x" padding
1284
+ input:not([type=submit], [type=reset], [type=image], [type=checkbox], [type=radio], [type=range]),
1285
+ select,
1286
+ textarea {
1287
+ padding-right: 6px;
1288
+ }
1266
1289
 
1267
- dd {
1268
- margin-bottom: 10px;
1269
- min-width: var(--semanticFormsInputMinWidth) !important; /* this matches the max-width of js-enabled inputs */
1270
-
1271
- // nudge single checkboxes to match checkbox groups
1272
- &:not(.checkboxes) {
1273
- input[type=checkbox] {
1274
- margin-left: 10px;
1275
- }
1276
- }
1277
-
1278
- // remove "x" padding
1279
- input:not([type=submit], [type=reset], [type=image], [type=checkbox], [type=radio], [type=range]),
1280
- select,
1281
- textarea {
1282
- padding-right: 6px;
1283
- }
1290
+ // subtext
1291
+ label {
1292
+ padding-left: 10px;
1293
+ margin-top: -5px;
1294
+ font-size: small;
1295
+ color: var(--semanticFormsPlaceholderColor);
1296
+ }
1284
1297
 
1285
- // subtext
1286
- label {
1287
- margin-top: -5px;
1288
- font-size: small;
1289
- color: var(--semanticFormsPlaceholderColor);
1290
- }
1298
+ // inline buttons
1299
+ button:not(.clear, .show),
1300
+ input[type="submit"]:not(.clear, .show),
1301
+ input[type="button"]:not(.clear, .show) {
1302
+ margin-top: 0;
1291
1303
  }
1292
1304
  }
1305
+ }
1293
1306
 
1294
- .checkboxes ul,
1295
- .radios ul {
1296
- margin-top: var(--semanticFormsInputTopMargin);
1297
- }
1307
+ .checkboxes ul,
1308
+ .radios ul {
1309
+ margin-top: var(--semanticFormsInputTopMargin);
1298
1310
  }
1299
1311
  // #endregion
1300
1312
  }
@@ -1352,3 +1364,391 @@ table.semanticForms {
1352
1364
  }
1353
1365
  }
1354
1366
  // #endregion
1367
+
1368
+ // #region container queries
1369
+ form.semanticForms,
1370
+ fieldset {
1371
+ container: semanticForm / inline-size;
1372
+
1373
+ // max 7 columns
1374
+ @container semanticForm (width >= 1810px) {
1375
+ & fieldset dl,
1376
+ & dl {
1377
+ grid-template-columns: repeat(7, minmax(var(--semanticFormsInputMinWidth), 1fr));
1378
+
1379
+ &:has(:not(div)) {
1380
+ & dt:nth-of-type(7n + 1),
1381
+ & dd:nth-of-type(7n + 1) {
1382
+ grid-column: 1;
1383
+ }
1384
+
1385
+ & dt:nth-of-type(7n + 2),
1386
+ & dd:nth-of-type(7n + 2) {
1387
+ grid-column: 2;
1388
+ }
1389
+
1390
+ & dt:nth-of-type(7n + 3),
1391
+ & dd:nth-of-type(7n + 3) {
1392
+ grid-column: 3;
1393
+ }
1394
+
1395
+ & dt:nth-of-type(7n + 4),
1396
+ & dd:nth-of-type(7n + 4) {
1397
+ grid-column: 4;
1398
+ }
1399
+
1400
+ & dt:nth-of-type(7n + 5),
1401
+ & dd:nth-of-type(7n + 5) {
1402
+ grid-column: 5;
1403
+ }
1404
+
1405
+ & dt:nth-of-type(7n + 6),
1406
+ & dd:nth-of-type(7n + 6) {
1407
+ grid-column: 6;
1408
+ }
1409
+
1410
+ & dt:nth-of-type(7n + 7),
1411
+ & dd:nth-of-type(7n + 7) {
1412
+ grid-column: 7;
1413
+ }
1414
+
1415
+ & dt:has(+ dd.colspan-5),
1416
+ & dt:has(+ dd.colspan-full),
1417
+ & dd.colspan-5,
1418
+ & dd.colspan-full {
1419
+ grid-column: span 5;
1420
+ }
1421
+
1422
+ & dt:has(+ dd.colspan-4),
1423
+ & dd.colspan-4 {
1424
+ grid-column: span 4;
1425
+ }
1426
+
1427
+ & dt:has(+ dd.colspan-3),
1428
+ & dd.colspan-3 {
1429
+ grid-column: span 3;
1430
+ }
1431
+
1432
+ & dt:has(+ dd.colspan-2),
1433
+ & dd.colspan-2 {
1434
+ grid-column: span 2;
1435
+ }
1436
+ }
1437
+ }
1438
+ }
1439
+
1440
+ // max 6 columns
1441
+ @container semanticForm (width >= 1550px) and (width < 1810px) {
1442
+ & fieldset dl,
1443
+ & dl {
1444
+ grid-template-columns: repeat(6, minmax(var(--semanticFormsInputMinWidth), 1fr));
1445
+
1446
+ &:has(:not(div)) {
1447
+ & dt:nth-of-type(6n + 1),
1448
+ & dd:nth-of-type(6n + 1) {
1449
+ grid-column: 1;
1450
+ }
1451
+
1452
+ & dt:nth-of-type(6n + 2),
1453
+ & dd:nth-of-type(6n + 2) {
1454
+ grid-column: 2;
1455
+ }
1456
+
1457
+ & dt:nth-of-type(6n + 3),
1458
+ & dd:nth-of-type(6n + 3) {
1459
+ grid-column: 3;
1460
+ }
1461
+
1462
+ & dt:nth-of-type(6n + 4),
1463
+ & dd:nth-of-type(6n + 4) {
1464
+ grid-column: 4;
1465
+ }
1466
+
1467
+ & dt:nth-of-type(6n + 5),
1468
+ & dd:nth-of-type(6n + 5) {
1469
+ grid-column: 5;
1470
+ }
1471
+
1472
+ & dt:nth-of-type(6n + 6),
1473
+ & dd:nth-of-type(6n + 6) {
1474
+ grid-column: 6;
1475
+ }
1476
+
1477
+ & dt:has(+ dd.colspan-5),
1478
+ & dt:has(+ dd.colspan-full),
1479
+ & dd.colspan-5,
1480
+ & dd.colspan-full {
1481
+ grid-column: span 5;
1482
+ }
1483
+
1484
+ & dt:has(+ dd.colspan-4),
1485
+ & dd.colspan-4 {
1486
+ grid-column: span 4;
1487
+ }
1488
+
1489
+ & dt:has(+ dd.colspan-3),
1490
+ & dd.colspan-3 {
1491
+ grid-column: span 3;
1492
+ }
1493
+
1494
+ & dt:has(+ dd.colspan-2),
1495
+ & dd.colspan-2 {
1496
+ grid-column: span 2;
1497
+ }
1498
+ }
1499
+ }
1500
+ }
1501
+
1502
+ // max 5 columns
1503
+ @container semanticForm (width >= 1290px) and (width < 1550px) {
1504
+ & fieldset dl,
1505
+ & dl {
1506
+ grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
1507
+
1508
+ &:has(:not(div)) {
1509
+ & dt:nth-of-type(5n + 1),
1510
+ & dd:nth-of-type(5n + 1) {
1511
+ grid-column: 1;
1512
+ }
1513
+
1514
+ & dt:nth-of-type(5n + 2),
1515
+ & dd:nth-of-type(5n + 2) {
1516
+ grid-column: 2;
1517
+ }
1518
+
1519
+ & dt:nth-of-type(5n + 3),
1520
+ & dd:nth-of-type(5n + 3) {
1521
+ grid-column: 3;
1522
+ }
1523
+
1524
+ & dt:nth-of-type(5n + 4),
1525
+ & dd:nth-of-type(5n + 4) {
1526
+ grid-column: 4;
1527
+ }
1528
+
1529
+ & dt:nth-of-type(5n + 5),
1530
+ & dd:nth-of-type(5n + 5) {
1531
+ grid-column: 5;
1532
+ }
1533
+
1534
+ & dt:has(+ dd.colspan-5),
1535
+ & dt:has(+ dd.colspan-full),
1536
+ & dd.colspan-5,
1537
+ & dd.colspan-full {
1538
+ grid-column: span 5;
1539
+ }
1540
+
1541
+ & dt:has(+ dd.colspan-4),
1542
+ & dd.colspan-4 {
1543
+ grid-column: span 4;
1544
+ }
1545
+
1546
+ & dt:has(+ dd.colspan-3),
1547
+ & dd.colspan-3 {
1548
+ grid-column: span 3;
1549
+ }
1550
+
1551
+ & dt:has(+ dd.colspan-2),
1552
+ & dd.colspan-2 {
1553
+ grid-column: span 2;
1554
+ }
1555
+ }
1556
+ }
1557
+ }
1558
+
1559
+ // max 4 columns
1560
+ @container semanticForm (width >= 1030px) and (width < 1290px) {
1561
+ & fieldset dl,
1562
+ & fieldset.colspan-5 dl,
1563
+ & dl,
1564
+ & dl.colspan-5 {
1565
+ grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
1566
+
1567
+ div.colspan-5 {
1568
+ grid-column: span 4;
1569
+ }
1570
+
1571
+ &:has(:not(div)) {
1572
+ & dt:nth-of-type(4n + 1),
1573
+ & dd:nth-of-type(4n + 1) {
1574
+ grid-column: 1;
1575
+ }
1576
+
1577
+ & dt:nth-of-type(4n + 2),
1578
+ & dd:nth-of-type(4n + 2) {
1579
+ grid-column: 2;
1580
+ }
1581
+
1582
+ & dt:nth-of-type(4n + 3),
1583
+ & dd:nth-of-type(4n + 3) {
1584
+ grid-column: 3;
1585
+ }
1586
+
1587
+ & dt:nth-of-type(4n + 4),
1588
+ & dd:nth-of-type(4n + 4) {
1589
+ grid-column: 4;
1590
+ }
1591
+
1592
+ & dt:has(+ dd.colspan-4),
1593
+ & dt:has(+ dd.colspan-5),
1594
+ & dt:has(+ dd.colspan-full),
1595
+ & dd.colspan-4,
1596
+ & dd.colspan-5,
1597
+ & dd.colspan-full {
1598
+ grid-column: span 4;
1599
+ }
1600
+
1601
+ & dt:has(+ dd.colspan-3),
1602
+ & dd.colspan-3 {
1603
+ grid-column: span 3;
1604
+ }
1605
+
1606
+ & dt:has(+ dd.colspan-2),
1607
+ & dd.colspan-2 {
1608
+ grid-column: span 2;
1609
+ }
1610
+ }
1611
+ }
1612
+ }
1613
+
1614
+ // max 3 columns
1615
+ @container semanticForm (width >= 850px) and (width < 1030px) {
1616
+ & fieldset dl,
1617
+ & fieldset.colspan-4 dl,
1618
+ & fieldset.colspan-5 dl,
1619
+ & dl,
1620
+ & dl.colspan-4,
1621
+ & dl.colspan-5 {
1622
+ grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
1623
+
1624
+ div.colspan-4,
1625
+ div.colspan-5 {
1626
+ grid-column: span 3;
1627
+ }
1628
+
1629
+ &:has(:not(div)) {
1630
+ & dt:nth-of-type(3n + 1),
1631
+ & dd:nth-of-type(3n + 1) {
1632
+ grid-column: 1;
1633
+ }
1634
+
1635
+ & dt:nth-of-type(3n + 2),
1636
+ & dd:nth-of-type(3n + 2) {
1637
+ grid-column: 2;
1638
+ }
1639
+
1640
+ & dt:nth-of-type(3n + 3),
1641
+ & dd:nth-of-type(3n + 3) {
1642
+ grid-column: 3;
1643
+ }
1644
+
1645
+ & dt:has(+ dd.colspan-3),
1646
+ & dt:has(+ dd.colspan-4),
1647
+ & dt:has(+ dd.colspan-5),
1648
+ & dt:has(+ dd.colspan-full),
1649
+ & dd.colspan-3,
1650
+ & dd.colspan-4,
1651
+ & dd.colspan-5,
1652
+ & dd.colspan-full {
1653
+ grid-column: span 3;
1654
+ }
1655
+
1656
+ & dt:has(+ dd.colspan-2),
1657
+ & dd.colspan-2 {
1658
+ grid-column: span 2;
1659
+ }
1660
+ }
1661
+ }
1662
+ }
1663
+
1664
+ // max 2 columns
1665
+ @container semanticForm (width >= 510px) and (width < 850px) {
1666
+ & fieldset dl,
1667
+ & fieldset.colspan-3 dl,
1668
+ & fieldset.colspan-4 dl,
1669
+ & fieldset.colspan-5 dl,
1670
+ & dl,
1671
+ & dl.colspan-3,
1672
+ & dl.colspan-4,
1673
+ & dl.colspan-5 {
1674
+ grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
1675
+
1676
+ div.colspan-3,
1677
+ div.colspan-4,
1678
+ div.colspan-5 {
1679
+ grid-column: span 2;
1680
+ }
1681
+
1682
+ &:has(:not(div)) {
1683
+ & dt:nth-of-type(2n + 1),
1684
+ & dd:nth-of-type(2n + 1) {
1685
+ grid-column: 1;
1686
+ }
1687
+
1688
+ & dt:nth-of-type(2n + 2),
1689
+ & dd:nth-of-type(2n + 2) {
1690
+ grid-column: 2;
1691
+ }
1692
+
1693
+ & dt:has(+ dd.colspan-2),
1694
+ & dt:has(+ dd.colspan-3),
1695
+ & dt:has(+ dd.colspan-4),
1696
+ & dt:has(+ dd.colspan-5),
1697
+ & dt:has(+ dd.colspan-full),
1698
+ & dd.colspan-2,
1699
+ & dd.colspan-3,
1700
+ & dd.colspan-4,
1701
+ & dd.colspan-5,
1702
+ & dd.colspan-full {
1703
+ grid-column: span 2;
1704
+ }
1705
+ }
1706
+ }
1707
+ }
1708
+
1709
+ // max 1 column
1710
+ @container semanticForm (width < 510px) {
1711
+ & fieldset dl,
1712
+ & fieldset.colspan-2 dl,
1713
+ & fieldset.colspan-3 dl,
1714
+ & fieldset.colspan-4 dl,
1715
+ & fieldset.colspan-5 dl,
1716
+ & dl,
1717
+ & dl.colspan-2,
1718
+ & dl.colspan-3,
1719
+ & dl.colspan-4,
1720
+ & dl.colspan-5 {
1721
+ grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
1722
+
1723
+ div.colspan-2,
1724
+ div.colspan-3,
1725
+ div.colspan-4,
1726
+ div.colspan-5 {
1727
+ grid-column: span 1;
1728
+ }
1729
+
1730
+ &:has(:not(div)) {
1731
+ & dt:nth-of-type(n + 1),
1732
+ & dd:nth-of-type(n + 1) {
1733
+ grid-column: 1;
1734
+ }
1735
+
1736
+ & dt:has(+ dd.colspan-1),
1737
+ & dt:has(+ dd.colspan-2),
1738
+ & dt:has(+ dd.colspan-3),
1739
+ & dt:has(+ dd.colspan-4),
1740
+ & dt:has(+ dd.colspan-5),
1741
+ & dt:has(+ dd.colspan-full),
1742
+ & dd.colspan-1,
1743
+ & dd.colspan-2,
1744
+ & dd.colspan-3,
1745
+ & dd.colspan-4,
1746
+ & dd.colspan-5,
1747
+ & dd.colspan-full {
1748
+ grid-column: span 1;
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1753
+ }
1754
+ // #endregion