semantic-forms 5.2.0 → 5.2.2

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.
@@ -95,8 +95,6 @@ table.semanticForms.light {
95
95
  font-family: var(--semanticFormsFontFamily);
96
96
  font-size: var(--semanticFormsFontSize);
97
97
  width: 100%;
98
- container-type: inline-size;
99
- container-name: semanticForm;
100
98
 
101
99
  // https://caniuse.com/wf-interpolate-size
102
100
  @supports (interpolate-size: allow-keywords) {
@@ -140,6 +138,11 @@ table.semanticForms.light {
140
138
  }
141
139
 
142
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
+
143
146
  input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
144
147
  select,
145
148
  textarea {
@@ -151,23 +154,71 @@ table.semanticForms.light {
151
154
  touch-action: manipulation;
152
155
  outline: none;
153
156
 
154
- &:not([type="range"]):placeholder-shown {
155
- padding: 6px 20px;
156
- }
157
-
158
157
  &:not([type="range"]) {
159
158
  padding: 6px 30px 6px 20px;
160
159
  }
161
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
162
172
  &[type="password"], &[type="text"]:has(~ button.show) {
163
173
  padding: 6px 55px 6px 20px;
164
174
  }
165
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
+
166
207
  &[type="range"],
167
208
  &[type="color"] {
168
209
  cursor: pointer;
169
210
  }
170
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
+
171
222
  &[disabled] {
172
223
  cursor: not-allowed;
173
224
  opacity: 0.5;
@@ -182,50 +233,10 @@ table.semanticForms.light {
182
233
  }
183
234
  }
184
235
 
185
- // focused styles
186
- input:not([type='submit'], [type='reset'], [type='image']),
187
- select,
188
- textarea {
189
- // custom focus highlight
190
- &:focus {
191
- outline: none;
192
- box-shadow: 0 0 0 1px var(--semanticFormsBorderColor);
193
- }
194
- }
195
-
196
- input:not([type='submit'], [type='reset'], [type='image'], [type=checkbox], [type=radio]),
197
- select {
198
- height: var(--semanticFormsInputHeight);
199
- }
200
-
201
- // specific styling for color input
202
- input[type=color] {
203
- height: var(--semanticFormsInputHeight);
204
- padding: 4px !important;
205
- padding-right: 30px !important;
206
- }
207
-
208
- input[type=checkbox],
209
- input[type=radio] {
210
- // 30% larger based on parent font size
211
- width: 18px;
212
- height: 18px;
213
- margin: 3px 0;
214
- cursor: pointer;
215
-
216
- & ~ label:first-of-type {
217
- color: var(--semanticFormsTextColor) !important;
218
- }
219
- }
220
-
221
- input[type=file] {
222
- cursor: pointer;
223
- font-size: var(--semanticFormsInputFontSize);
224
- }
225
-
226
236
  select {
227
237
  cursor: pointer;
228
238
 
239
+ // single selects
229
240
  &:not([multiple]) {
230
241
  // custom dropdown graphic on select element
231
242
  background-image: var(--semanticFormsSelectIcon);
@@ -237,10 +248,11 @@ table.semanticForms.light {
237
248
  appearance: none;
238
249
  }
239
250
 
251
+ // multi-selects
240
252
  &[multiple] {
241
253
  min-height: 38px;
242
254
  height: 100px;
243
- padding: 0 !important;
255
+ padding: 0;
244
256
 
245
257
  option {
246
258
  padding: 6px 20px;
@@ -266,29 +278,6 @@ table.semanticForms.light {
266
278
  field-sizing: content;
267
279
  }
268
280
  }
269
-
270
- input[type="search"] {
271
- background: var(--semanticFormsSearchIcon) no-repeat 10px;
272
- background-color: var(--semanticFormsFormBgColor);
273
- background-size: 18px;
274
- padding-left: 32px !important; // shift values to the right
275
-
276
- & + label.floatLabelFormAnimatedLabel {
277
- left: 32px !important; // override float label
278
- }
279
-
280
- &:focus,
281
- &:not(:placeholder-shown) {
282
- & + label.floatLabelFormAnimatedLabel {
283
- left: 20px !important;
284
- }
285
- }
286
-
287
- // hide native cancel button
288
- &::-webkit-search-cancel-button {
289
- display: none;
290
- }
291
- }
292
281
  // #endregion
293
282
 
294
283
  // #region buttons
@@ -333,7 +322,7 @@ table.semanticForms.light {
333
322
  // button styling
334
323
  input[type='submit'],
335
324
  input[type='reset'],
336
- button:not(.clear):not(.show),
325
+ button:not(.clear, .show),
337
326
  .button-link {
338
327
  appearance: none;
339
328
  -moz-appearance: none;
@@ -376,7 +365,7 @@ table.semanticForms.light {
376
365
 
377
366
  &:visited,
378
367
  &:link {
379
- color: var(--semanticFormsTextColor) !important;
368
+ color: var(--semanticFormsTextColor);
380
369
  }
381
370
  }
382
371
  // #endregion
@@ -392,10 +381,10 @@ table.semanticForms.light {
392
381
  textarea {
393
382
  &.invalid,
394
383
  &:user-invalid {
395
- border: var(--semanticFormsInvalidBorder) !important;
384
+ border: var(--semanticFormsInvalidBorder);
396
385
 
397
386
  ~ label:nth-of-type(2) {
398
- color: var(--semanticFormsInvalid) !important;
387
+ color: var(--semanticFormsInvalid);
399
388
  }
400
389
 
401
390
  ~ [data-invalid-text] {
@@ -405,10 +394,10 @@ table.semanticForms.light {
405
394
  }
406
395
 
407
396
  &.warn {
408
- border: var(--semanticFormsWarnBorder) !important;
397
+ border: var(--semanticFormsWarnBorder);
409
398
 
410
399
  ~ label:nth-of-type(2) {
411
- color: var(--semanticFormsWarn) !important;
400
+ color: var(--semanticFormsWarn);
412
401
  }
413
402
 
414
403
  ~ [data-invalid-text] {
@@ -438,6 +427,7 @@ table.semanticForms.light {
438
427
  transition-property: background-color, color;
439
428
  }
440
429
 
430
+ // #region fieldset
441
431
  fieldset {
442
432
  border-radius: var(--semanticFormsBorderRadius);
443
433
  background: var(--semanticFormsFormSubBgColor);
@@ -461,6 +451,7 @@ table.semanticForms.light {
461
451
  }
462
452
  }
463
453
  }
454
+ // #endregion
464
455
 
465
456
  // #region details
466
457
  details {
@@ -540,6 +531,10 @@ table.semanticForms.light {
540
531
  transform: rotate(90deg);
541
532
  }
542
533
  }
534
+
535
+ & > dl:first-of-type {
536
+ margin-top: 15px;
537
+ }
543
538
  }
544
539
  }
545
540
 
@@ -569,7 +564,6 @@ table.semanticForms.light {
569
564
  }
570
565
 
571
566
  // #region container layout
572
-
573
567
  dl:has(dt > label, dd > input, dd > select, dd > textarea) {
574
568
  display: grid;
575
569
  grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
@@ -578,105 +572,94 @@ table.semanticForms.light {
578
572
 
579
573
  dd {
580
574
  position: relative;
575
+ display: flex;
576
+ flex-direction: column;
577
+ gap: 10px;
578
+ max-width: 100%;
581
579
 
582
- &.checkboxes, &.radios {
583
- display: flex;
584
- flex-direction: column;
585
- 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
+ }
586
592
 
587
- // checkbox subtext
588
- & > label {
589
- 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;
590
597
  font-size: small;
591
598
  color: var(--semanticFormsTextColor);
592
599
  }
593
600
  }
594
601
 
595
- &:not(.checkboxes, .radios) {
596
- gap: 10px;
597
- max-width: 100%;
602
+ &.singleRadio > input {
603
+ margin: 0;
604
+ }
598
605
 
599
- // places all items within the <dd> vertically
600
- &:not(.singleCheckbox, .singleRadio) {
606
+ // checkbox/radio groups
607
+ &.checkboxes, &.radios {
608
+ ul {
601
609
  display: flex;
602
610
  flex-direction: column;
611
+ margin-top: var(--semanticFormsInputTopMargin);
612
+ padding-left: 10px;
613
+ gap: 5px;
603
614
 
604
- // unless there is a button present, which will be placed beside the input
605
- &:has(button:not(.clear, .show), input[type="submit"]:not(.clear, .show)) {
606
- display: grid;
607
- grid-template-columns: 2fr 1fr;
608
-
609
- button.clear, button.show {
610
- right: 36%; // adjust clear/show button to grid
611
- }
612
-
613
- input:not([type="submit"]), select, textarea {
614
- grid-row: 1 / 2;
615
- grid-column: 1 / 2;
616
- }
617
-
618
- button:not(.clear, .show),
619
- input[type="submit"]:not(.clear, .show),
620
- input[type="button"]:not(.clear, .show) {
621
- grid-row: 1 / 2;
622
- grid-column: 2 / 3;
623
- width: 100%;
624
- max-width: 100%;
625
- padding: 10px; // reduce default padding to allow more button text to show
626
- margin-top: var(--semanticFormsInputTopMargin);
627
- height: var(--semanticFormsInputHeight);
628
- text-overflow: ellipsis;
629
- white-space: nowrap;
630
- overflow: hidden;
631
- display: inline-block;
632
- }
633
-
634
- label:nth-of-type(2),
635
- label:not(.floatLabelFormAnimatedLabel) {
636
- grid-row: 2 / 3;
637
- grid-column: 1 / -1;
638
- }
615
+ li {
616
+ display: flex;
617
+ align-items: center;
618
+ gap: 5px;
639
619
  }
640
620
  }
641
621
 
642
- &.singleCheckbox,
643
- &.singleRadio {
644
- display: grid;
645
- grid-template-columns: 15px 1fr;
646
- align-items: center;
647
- padding-left: 11px;
622
+ // checkbox subtext
623
+ & > label {
624
+ padding-left: 20px;
625
+ font-size: small;
626
+ color: var(--semanticFormsTextColor);
627
+ }
628
+ }
648
629
 
649
- & > :not(input[type='checkbox'], input[type='radio'], label) {
650
- grid-column: 1 / -1;
651
- }
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;
652
634
 
653
- // single checkbox subtext
654
- label:nth-of-type(2) {
655
- grid-column: 1 / -1;
656
- padding: 0 10px;
657
- font-size: small;
658
- color: var(--semanticFormsTextColor);
659
- }
635
+ button.clear, button.show {
636
+ right: 36%; // adjust clear/show button to grid
660
637
  }
661
638
 
662
- &.singleRadio {
663
- input {
664
- margin: 0;
665
- }
639
+ input:not([type="submit"]), select, textarea {
640
+ grid-row: 1 / 2;
641
+ grid-column: 1 / 2;
666
642
  }
667
- }
668
643
 
669
- &.checkboxes ul, &.radios ul {
670
- display: flex;
671
- flex-direction: column;
672
- margin-top: var(--semanticFormsInputTopMargin);
673
- padding-left: 10px;
674
- gap: 5px;
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
+ }
675
658
 
676
- li {
677
- display: flex;
678
- align-items: center;
679
- gap: 5px;
659
+ label:nth-of-type(2),
660
+ label:not(.floatLabelFormAnimatedLabel) {
661
+ grid-row: 2 / 3;
662
+ grid-column: 1 / -1;
680
663
  }
681
664
  }
682
665
 
@@ -684,7 +667,7 @@ table.semanticForms.light {
684
667
  &:has(span.focus-key) {
685
668
  // make room for focus key span
686
669
  label:first-of-type {
687
- width: calc(100% - 95px) !important;
670
+ width: calc(100% - 95px);
688
671
  }
689
672
 
690
673
  span.focus-key {
@@ -778,7 +761,7 @@ table.semanticForms.light {
778
761
  textarea {
779
762
  &:focus:not([type=checkbox], [type=radio], .no-float-label) ~ label:first-of-type,
780
763
  &:not(:placeholder-shown):not(.no-float-label):not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
781
- color: var(--semanticFormsTextColor) !important;
764
+ color: var(--semanticFormsTextColor);
782
765
  transform: translateY(-150%) scale(0.7);
783
766
  width: 100%;
784
767
  }
@@ -796,18 +779,26 @@ table.semanticForms.light {
796
779
 
797
780
  select ~ label:first-of-type {
798
781
  // force label to be correct color
799
- 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);
800
788
  }
801
789
 
790
+ // input label
802
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;
803
798
  line-height: 1.2;
804
799
  font-size: var(--semanticFormsInputFontSize);
805
- position: absolute;
806
800
  transform-origin: left center;
807
801
  pointer-events: none;
808
- // when the label is positioned within the input it needs a buffer
809
- top: calc(var(--semanticFormsInputTopMargin) + 10px);
810
- left: 20px;
811
802
  transition: transform 250ms;
812
803
  cursor: text;
813
804
  flex: 1;
@@ -816,9 +807,29 @@ table.semanticForms.light {
816
807
  text-overflow: ellipsis;
817
808
  min-width: 0;
818
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
+ }
819
830
  }
820
831
 
821
- // subtext
832
+ // subtext label
822
833
  label:nth-of-type(2) {
823
834
  margin-top: -5px;
824
835
  padding: 0 10px;
@@ -835,6 +846,7 @@ table.semanticForms.light {
835
846
  input,
836
847
  textarea {
837
848
  transition: opacity 250ms;
849
+
838
850
  // hide placeholder content until input is focused
839
851
  &::placeholder {
840
852
  opacity: 0;
@@ -876,33 +888,8 @@ table.semanticForms.light {
876
888
  }
877
889
  }
878
890
 
879
- label:first-of-type {
880
- user-select: none;
881
- color: var(--semanticFormsPlaceholderColor);
882
- touch-action: manipulation;
883
- display: flex;
884
- align-items: center;
885
- gap: 5px;
886
-
887
- span.required {
888
- cursor: help;
889
- pointer-events: auto;
890
- color: red;
891
- }
892
-
893
- span.help {
894
- display: grid;
895
- place-items: center;
896
- cursor: help;
897
- pointer-events: auto;
898
-
899
- svg {
900
- width: 80%;
901
- }
902
- }
903
- }
904
-
905
- .focus-key {
891
+ // keyboard shortcut indicator
892
+ span.focus-key {
906
893
  color: var(--semanticFormsPlaceholderColor);
907
894
  position: absolute;
908
895
  top: calc(var(--semanticFormsInputTopMargin) + 11px);
@@ -918,6 +905,12 @@ table.semanticForms.light {
918
905
  right: 45px;
919
906
  }
920
907
  }
908
+
909
+ &:has(input[type="search"]) {
910
+ label:first-of-type {
911
+ left: 32px;
912
+ }
913
+ }
921
914
  }
922
915
 
923
916
  // top level label for checkbox and radio groups
@@ -1048,7 +1041,6 @@ table.semanticForms.light {
1048
1041
  grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
1049
1042
  }
1050
1043
 
1051
-
1052
1044
  fieldset.colspan-3 dl,
1053
1045
  dl.colspan-3 {
1054
1046
  grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
@@ -1063,270 +1055,94 @@ table.semanticForms.light {
1063
1055
  dl.colspan-1 {
1064
1056
  grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
1065
1057
  }
1066
- // #endregion
1067
-
1068
- // #region container queries
1069
- // The container is the <fieldset> element
1070
- @container semanticForm (width > 2250px) {
1071
- fieldset dl,
1072
- dl {
1073
- grid-template-columns: repeat(6, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1074
-
1075
- div {
1076
- max-width: 100% !important;
1077
- }
1078
- }
1079
-
1080
- &.lowFlow,
1081
- &:not(.semanticFormsActive) {
1082
- & fieldset dl,
1083
- & dl {
1084
- & dt:nth-of-type(6n + 1),
1085
- & dd:nth-of-type(6n + 1) {
1086
- grid-column: 1;
1087
- }
1088
-
1089
- & dt:nth-of-type(6n + 2),
1090
- & dd:nth-of-type(6n + 2) {
1091
- grid-column: 2;
1092
- }
1093
-
1094
- & dt:nth-of-type(6n + 3),
1095
- & dd:nth-of-type(6n + 3) {
1096
- grid-column: 3;
1097
- }
1098
-
1099
- & dt:nth-of-type(6n + 4),
1100
- & dd:nth-of-type(6n + 4) {
1101
- grid-column: 4;
1102
- }
1103
-
1104
- & dt:nth-of-type(6n + 5),
1105
- & dd:nth-of-type(6n + 5) {
1106
- grid-column: 5;
1107
- }
1108
1058
 
1109
- & dt:nth-of-type(6n + 6),
1110
- & dd:nth-of-type(6n + 6) {
1111
- grid-column: 6;
1112
- }
1113
- }
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;
1114
1064
  }
1115
1065
  }
1116
1066
 
1117
- // max 5 columns
1118
- @container semanticForm (width < 2250px) {
1119
- fieldset dl,
1120
- dl {
1121
- grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1122
-
1123
- div {
1124
- max-width: 100% !important;
1125
- }
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;
1126
1072
  }
1127
-
1128
- &.lowFlow,
1129
- &:not(.semanticFormsActive) {
1130
- & fieldset dl,
1131
- & dl {
1132
- & dt:nth-of-type(5n + 1),
1133
- & dd:nth-of-type(5n + 1) {
1134
- grid-column: 1;
1135
- }
1136
1073
 
1137
- & dt:nth-of-type(5n + 2),
1138
- & dd:nth-of-type(5n + 2) {
1139
- grid-column: 2;
1140
- }
1141
-
1142
- & dt:nth-of-type(5n + 3),
1143
- & dd:nth-of-type(5n + 3) {
1144
- grid-column: 3;
1145
- }
1146
-
1147
- & dt:nth-of-type(5n + 4),
1148
- & dd:nth-of-type(5n + 4) {
1149
- grid-column: 4;
1150
- }
1151
-
1152
- & dt:nth-of-type(5n + 5),
1153
- & dd:nth-of-type(5n + 5) {
1154
- grid-column: 5;
1155
- }
1156
- }
1074
+ dt:nth-of-type(2n + 2),
1075
+ dd:nth-of-type(2n + 2) {
1076
+ grid-column: 2;
1157
1077
  }
1158
1078
  }
1159
1079
 
1160
- @container semanticForm (width < 1400px) {
1161
- fieldset dl,
1162
- dl,
1163
- fieldset.colspan-5 dl,
1164
- dl.colspan-5 {
1165
- grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
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;
1166
1085
  }
1167
1086
 
1168
- div.colspan-5 {
1169
- grid-column: span 4 !important;
1087
+ dt:nth-of-type(3n + 2),
1088
+ dd:nth-of-type(3n + 2) {
1089
+ grid-column: 2;
1170
1090
  }
1171
1091
 
1172
- &.lowFlow,
1173
- &:not(.semanticFormsActive) {
1174
- & fieldset dl,
1175
- & fieldset.colspan-5 dl,
1176
- & dl,
1177
- & dl.colspan-5 {
1178
- & dt:nth-of-type(4n + 1),
1179
- & dd:nth-of-type(4n + 1) {
1180
- grid-column: 1;
1181
- }
1182
-
1183
- & dt:nth-of-type(4n + 2),
1184
- & dd:nth-of-type(4n + 2) {
1185
- grid-column: 2;
1186
- }
1187
-
1188
- & dt:nth-of-type(4n + 3),
1189
- & dd:nth-of-type(4n + 3) {
1190
- grid-column: 3;
1191
- }
1192
-
1193
- & dt:nth-of-type(4n + 4),
1194
- & dd:nth-of-type(4n + 4) {
1195
- grid-column: 4;
1196
- }
1197
- }
1092
+ dt:nth-of-type(3n + 3),
1093
+ dd:nth-of-type(3n + 3) {
1094
+ grid-column: 3;
1198
1095
  }
1199
1096
  }
1200
1097
 
1201
- // max 3 columns
1202
- @container semanticForm (width < 1120px) {
1203
- fieldset dl,
1204
- fieldset.colspan-4 dl,
1205
- fieldset.colspan-5 dl,
1206
- dl,
1207
- dl.colspan-4,
1208
- dl.colspan-5 {
1209
- grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1210
- }
1211
-
1212
-
1213
- div.colspan-4, div.colspan-5 {
1214
- grid-column: span 3 !important;
1215
- }
1216
-
1217
- &.lowFlow,
1218
- &:not(.semanticFormsActive) {
1219
- & fieldset dl,
1220
- & fieldset.colspan-4 dl,
1221
- & fieldset.colspan-5 dl,
1222
- & dl,
1223
- & dl.colspan-4,
1224
- & dl.colspan-5 {
1225
- & dt:nth-of-type(3n + 1),
1226
- & dd:nth-of-type(3n + 1) {
1227
- grid-column: 1;
1228
- }
1229
-
1230
- & dt:nth-of-type(3n + 2),
1231
- & dd:nth-of-type(3n + 2) {
1232
- grid-column: 2;
1233
- }
1234
-
1235
- & dt:nth-of-type(3n + 3),
1236
- & dd:nth-of-type(3n + 3) {
1237
- grid-column: 3;
1238
- }
1239
- }
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;
1240
1103
  }
1241
- }
1242
1104
 
1243
- // max 2 columns
1244
- @container semanticForm (width < 850px) {
1245
- fieldset dl,
1246
- fieldset.colspan-3 dl,
1247
- fieldset.colspan-4 dl,
1248
- fieldset.colspan-5 dl,
1249
- dl,
1250
- dl.colspan-3,
1251
- dl.colspan-4,
1252
- dl.colspan-5 {
1253
- grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
1105
+ dt:nth-of-type(4n + 2),
1106
+ dd:nth-of-type(4n + 2) {
1107
+ grid-column: 2;
1254
1108
  }
1255
1109
 
1256
- div {
1257
- max-width: 100% !important;
1258
- }
1259
-
1260
- div.colspan-3,
1261
- div.colspan-4,
1262
- div.colspan-5 {
1263
- grid-column: span 2 !important;
1264
- }
1265
-
1266
- &.lowFlow,
1267
- &:not(.semanticFormsActive) {
1268
- & fieldset dl,
1269
- & fieldset.colspan-3 dl,
1270
- & fieldset.colspan-4 dl,
1271
- & fieldset.colspan-5 dl,
1272
- & dl,
1273
- & dl.colspan-3,
1274
- & dl.colspan-4,
1275
- & dl.colspan-5 {
1276
- & dt:nth-of-type(2n + 1),
1277
- & dd:nth-of-type(2n + 1) {
1278
- grid-column: 1;
1279
- }
1110
+ dt:nth-of-type(4n + 3),
1111
+ dd:nth-of-type(4n + 3) {
1112
+ grid-column: 3;
1113
+ }
1280
1114
 
1281
- & dt:nth-of-type(2n + 2),
1282
- & dd:nth-of-type(2n + 2) {
1283
- grid-column: 2;
1284
- }
1285
- }
1115
+ dt:nth-of-type(4n + 4),
1116
+ dd:nth-of-type(4n + 4) {
1117
+ grid-column: 4;
1286
1118
  }
1287
1119
  }
1288
1120
 
1289
- // max 1 column
1290
- @container semanticForm (width < 615px) {
1291
- fieldset dl,
1292
- fieldset.colspan-2 dl,
1293
- fieldset.colspan-3 dl,
1294
- fieldset.colspan-4 dl,
1295
- fieldset.colspan-5 dl,
1296
- dl,
1297
- dl.colspan-2,
1298
- dl.colspan-3,
1299
- dl.colspan-4,
1300
- dl.colspan-5,
1301
- dl {
1302
- grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr)) !important;
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;
1303
1126
  }
1304
1127
 
1305
- div {
1306
- max-width: 100% !important;
1128
+ dt:nth-of-type(5n + 2),
1129
+ dd:nth-of-type(5n + 2) {
1130
+ grid-column: 2;
1307
1131
  }
1308
1132
 
1309
- div.colspan-2, div.colspan-3, div.colspan-4, div.colspan-5 {
1310
- grid-column: span 1 !important;
1133
+ dt:nth-of-type(5n + 3),
1134
+ dd:nth-of-type(5n + 3) {
1135
+ grid-column: 3;
1311
1136
  }
1312
1137
 
1313
- &.lowFlow,
1314
- &:not(.semanticFormsActive) {
1315
- & fieldset dl,
1316
- & fieldset.colspan-2 dl,
1317
- & fieldset.colspan-3 dl,
1318
- & fieldset.colspan-4 dl,
1319
- & fieldset.colspan-5 dl,
1320
- & dl,
1321
- & dl.colspan-2,
1322
- & dl.colspan-3,
1323
- & dl.colspan-4,
1324
- & dl.colspan-5 {
1325
- & dt:nth-of-type(n + 1),
1326
- & dd:nth-of-type(n + 1) {
1327
- grid-column: 1;
1328
- }
1329
- }
1138
+ dt:nth-of-type(5n + 4),
1139
+ dd:nth-of-type(5n + 4) {
1140
+ grid-column: 4;
1141
+ }
1142
+
1143
+ dt:nth-of-type(5n + 5),
1144
+ dd:nth-of-type(5n + 5) {
1145
+ grid-column: 5;
1330
1146
  }
1331
1147
  }
1332
1148
  // #endregion
@@ -1355,7 +1171,7 @@ table.semanticForms.light {
1355
1171
  }
1356
1172
 
1357
1173
  dt {
1358
- min-width: var(--semanticFormsInputMinWidth) !important; /* this matches the max-width of js-enabled inputs */
1174
+ min-width: var(--semanticFormsInputMinWidth); /* this matches the max-width of js-enabled inputs */
1359
1175
 
1360
1176
  label {
1361
1177
  position: absolute;
@@ -1363,7 +1179,7 @@ table.semanticForms.light {
1363
1179
  height: 11px;
1364
1180
  transform: scale(0.7);
1365
1181
  transform-origin: left center;
1366
- padding-left: 29px;
1182
+ padding-left: 22px;
1367
1183
  margin-top: -1px;
1368
1184
  }
1369
1185
 
@@ -1392,7 +1208,7 @@ table.semanticForms.light {
1392
1208
  &:has(+ dd input[type=checkbox]) {
1393
1209
  label {
1394
1210
  transform: scale(1);
1395
- margin-top: 4px;
1211
+ margin-top: 0;
1396
1212
  margin-left: 8px;
1397
1213
  }
1398
1214
  }
@@ -1400,7 +1216,7 @@ table.semanticForms.light {
1400
1216
  &:has(+ dd input[type=radio]) {
1401
1217
  label {
1402
1218
  transform: scale(1);
1403
- margin-top: 2px;
1219
+ margin-top: 0;
1404
1220
  margin-left: 8px;
1405
1221
  }
1406
1222
  }
@@ -1412,7 +1228,7 @@ table.semanticForms.light {
1412
1228
  // margin-bottom: 10px;
1413
1229
  margin-top: var(--semanticFormsInputTopMargin);
1414
1230
  margin-bottom: 10px;
1415
- min-width: var(--semanticFormsInputMinWidth) !important; /* this matches the max-width of js-enabled inputs */
1231
+ min-width: var(--semanticFormsInputMinWidth); /* this matches the max-width of js-enabled inputs */
1416
1232
 
1417
1233
  // checkbox/radio groups
1418
1234
  &.checkboxes,
@@ -1444,14 +1260,11 @@ table.semanticForms.light {
1444
1260
  margin-top: 0;
1445
1261
  padding-left: 10px;
1446
1262
 
1447
- input[type=checkbox] {
1448
- margin-left: 1px;
1449
- margin-top: 2px;
1450
- }
1451
-
1263
+ input[type=checkbox],
1452
1264
  input[type=radio] {
1453
1265
  margin-left: 1px;
1454
1266
  margin-top: 1px;
1267
+ margin-right: auto;
1455
1268
  }
1456
1269
 
1457
1270
  // additional info text
@@ -1486,7 +1299,7 @@ table.semanticForms.light {
1486
1299
  button:not(.clear, .show),
1487
1300
  input[type="submit"]:not(.clear, .show),
1488
1301
  input[type="button"]:not(.clear, .show) {
1489
- margin-top: 0 !important;
1302
+ margin-top: 0;
1490
1303
  }
1491
1304
  }
1492
1305
  }
@@ -1551,3 +1364,391 @@ table.semanticForms {
1551
1364
  }
1552
1365
  }
1553
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