semantic-forms 5.1.11 → 5.2.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 +13 -0
- package/dist/semantic-forms.cjs +59 -10
- package/dist/semantic-forms.cjs.map +1 -1
- package/dist/semantic-forms.css +1834 -924
- package/dist/semantic-forms.css.map +1 -1
- package/dist/semantic-forms.js +59 -10
- 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 +59 -10
- package/dist/semantic-forms.mjs.map +1 -1
- package/docs/statics/pages/fullDemo.html +93 -0
- package/docs/statics/pages/index.html +1 -0
- package/docs/statics/pages/reservedKeyboardShortcuts.html +838 -0
- package/docs/statics/pages/usage.html +81 -0
- package/package.json +3 -3
- package/semanticForms.js +249 -11
- package/semanticForms.scss +490 -254
package/semanticForms.scss
CHANGED
|
@@ -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:
|
|
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:
|
|
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;
|
|
@@ -96,6 +98,11 @@ table.semanticForms.light {
|
|
|
96
98
|
container-type: inline-size;
|
|
97
99
|
container-name: semanticForm;
|
|
98
100
|
|
|
101
|
+
// https://caniuse.com/wf-interpolate-size
|
|
102
|
+
@supports (interpolate-size: allow-keywords) {
|
|
103
|
+
interpolate-size: allow-keywords;
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
// due to the specificity of some of these rules, [hidden] won't actually hide things, so we're forcing the issue
|
|
100
107
|
[hidden] {
|
|
101
108
|
display: none !important;
|
|
@@ -201,8 +208,8 @@ table.semanticForms.light {
|
|
|
201
208
|
input[type=checkbox],
|
|
202
209
|
input[type=radio] {
|
|
203
210
|
// 30% larger based on parent font size
|
|
204
|
-
width:
|
|
205
|
-
height:
|
|
211
|
+
width: 18px;
|
|
212
|
+
height: 18px;
|
|
206
213
|
margin: 3px 0;
|
|
207
214
|
cursor: pointer;
|
|
208
215
|
|
|
@@ -254,6 +261,10 @@ table.semanticForms.light {
|
|
|
254
261
|
line-height: 1.5;
|
|
255
262
|
width: 100%;
|
|
256
263
|
min-height: 38px;
|
|
264
|
+
|
|
265
|
+
&[data-auto-grow] {
|
|
266
|
+
field-sizing: content;
|
|
267
|
+
}
|
|
257
268
|
}
|
|
258
269
|
|
|
259
270
|
input[type="search"] {
|
|
@@ -393,6 +404,18 @@ table.semanticForms.light {
|
|
|
393
404
|
}
|
|
394
405
|
}
|
|
395
406
|
|
|
407
|
+
&.warn {
|
|
408
|
+
border: var(--semanticFormsWarnBorder) !important;
|
|
409
|
+
|
|
410
|
+
~ label:nth-of-type(2) {
|
|
411
|
+
color: var(--semanticFormsWarn) !important;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
~ [data-invalid-text] {
|
|
415
|
+
font-size: small;
|
|
416
|
+
display: flex;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
396
419
|
}
|
|
397
420
|
// #endregion
|
|
398
421
|
|
|
@@ -439,11 +462,11 @@ table.semanticForms.light {
|
|
|
439
462
|
}
|
|
440
463
|
}
|
|
441
464
|
|
|
442
|
-
// #region
|
|
465
|
+
// #region details
|
|
443
466
|
details {
|
|
444
467
|
box-sizing: border-box; // ensure sizings match across browsers
|
|
445
468
|
position: relative;
|
|
446
|
-
background-color: var(--semanticFormsNestedFieldsetBgColor);
|
|
469
|
+
background-color: var(--semanticFormsNestedFieldsetBgColor);
|
|
447
470
|
border: var(--semanticFormsNestedFieldsetBorder);
|
|
448
471
|
border-radius: var(--semanticFormsBorderRadius);
|
|
449
472
|
display: flex;
|
|
@@ -452,14 +475,26 @@ table.semanticForms.light {
|
|
|
452
475
|
padding: 20px 10px 10px 10px;
|
|
453
476
|
margin-bottom: 15px;
|
|
454
477
|
min-height: calc(var(--semanticFormsFontSize) + 20px);
|
|
455
|
-
|
|
478
|
+
|
|
456
479
|
&::details-content {
|
|
457
480
|
visibility: hidden;
|
|
458
481
|
opacity: 0;
|
|
459
482
|
transition: opacity 250ms ease-in, visibility 0ms ease-in 250ms;
|
|
460
483
|
}
|
|
484
|
+
|
|
485
|
+
@supports (interpolate-size: allow-keywords) { // https://caniuse.com/wf-interpolate-size
|
|
486
|
+
transition: opacity 250ms ease-in, visibility 0ms ease-in 250ms, height 250ms;
|
|
487
|
+
|
|
488
|
+
&::details-content {
|
|
489
|
+
height: 0;
|
|
490
|
+
overflow: hidden;
|
|
491
|
+
transition: height 250ms, content-visibility 250ms;
|
|
492
|
+
transition-behavior: allow-discrete;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
461
495
|
|
|
462
496
|
summary {
|
|
497
|
+
cursor: pointer;
|
|
463
498
|
margin: 0;
|
|
464
499
|
line-height: 1;
|
|
465
500
|
position: absolute;
|
|
@@ -486,20 +521,24 @@ table.semanticForms.light {
|
|
|
486
521
|
transition: 250ms transform ease;
|
|
487
522
|
}
|
|
488
523
|
}
|
|
489
|
-
}
|
|
490
524
|
|
|
491
|
-
|
|
492
|
-
|
|
525
|
+
&[open] {
|
|
526
|
+
&::details-content {
|
|
527
|
+
visibility: visible;
|
|
528
|
+
opacity: 1;
|
|
529
|
+
transition: opacity 250ms ease-in, visibility 0ms ease-in 0ms;
|
|
530
|
+
}
|
|
493
531
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
532
|
+
@supports (interpolate-size: allow-keywords) {
|
|
533
|
+
&::details-content {
|
|
534
|
+
height: auto;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
499
537
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
538
|
+
summary {
|
|
539
|
+
&::before {
|
|
540
|
+
transform: rotate(90deg);
|
|
541
|
+
}
|
|
503
542
|
}
|
|
504
543
|
}
|
|
505
544
|
}
|
|
@@ -507,10 +546,6 @@ table.semanticForms.light {
|
|
|
507
546
|
details[open], summary {
|
|
508
547
|
margin-bottom: 10px;
|
|
509
548
|
}
|
|
510
|
-
|
|
511
|
-
summary {
|
|
512
|
-
cursor: pointer;
|
|
513
|
-
}
|
|
514
549
|
// #endregion
|
|
515
550
|
|
|
516
551
|
// update for scrollbars
|
|
@@ -565,6 +600,43 @@ table.semanticForms.light {
|
|
|
565
600
|
&:not(.singleCheckbox, .singleRadio) {
|
|
566
601
|
display: flex;
|
|
567
602
|
flex-direction: column;
|
|
603
|
+
|
|
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
|
+
}
|
|
639
|
+
}
|
|
568
640
|
}
|
|
569
641
|
|
|
570
642
|
&.singleCheckbox,
|
|
@@ -581,7 +653,7 @@ table.semanticForms.light {
|
|
|
581
653
|
// single checkbox subtext
|
|
582
654
|
label:nth-of-type(2) {
|
|
583
655
|
grid-column: 1 / -1;
|
|
584
|
-
padding
|
|
656
|
+
padding: 0 10px;
|
|
585
657
|
font-size: small;
|
|
586
658
|
color: var(--semanticFormsTextColor);
|
|
587
659
|
}
|
|
@@ -607,6 +679,29 @@ table.semanticForms.light {
|
|
|
607
679
|
gap: 5px;
|
|
608
680
|
}
|
|
609
681
|
}
|
|
682
|
+
|
|
683
|
+
// focus-key styles
|
|
684
|
+
&:has(span.focus-key) {
|
|
685
|
+
// make room for focus key span
|
|
686
|
+
label:first-of-type {
|
|
687
|
+
width: calc(100% - 95px) !important;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
span.focus-key {
|
|
691
|
+
display: block;
|
|
692
|
+
|
|
693
|
+
kbd {
|
|
694
|
+
font-family: sans-serif;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
&:has(input:focus, select:focus, textarea:focus),
|
|
699
|
+
&:not(:has(input:placeholder-shown, textarea:placeholder-shown)) {
|
|
700
|
+
span.focus-key {
|
|
701
|
+
display: none;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
610
705
|
}
|
|
611
706
|
}
|
|
612
707
|
|
|
@@ -656,6 +751,8 @@ table.semanticForms.light {
|
|
|
656
751
|
}
|
|
657
752
|
|
|
658
753
|
span.help {
|
|
754
|
+
display: grid;
|
|
755
|
+
place-items: center;
|
|
659
756
|
cursor: help;
|
|
660
757
|
pointer-events: auto;
|
|
661
758
|
|
|
@@ -682,16 +779,8 @@ table.semanticForms.light {
|
|
|
682
779
|
&:focus:not([type=checkbox], [type=radio], .no-float-label) ~ label:first-of-type,
|
|
683
780
|
&:not(:placeholder-shown):not(.no-float-label):not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
|
|
684
781
|
color: var(--semanticFormsTextColor) !important;
|
|
685
|
-
// TODO: finish this work on making the help icon responsive
|
|
686
|
-
// width: 100%;
|
|
687
|
-
// width: calc(100% + 20px);
|
|
688
782
|
transform: translateY(-150%) scale(0.7);
|
|
689
|
-
|
|
690
|
-
// span.required,
|
|
691
|
-
// span.help {
|
|
692
|
-
// position: static;
|
|
693
|
-
// right: auto;
|
|
694
|
-
// }
|
|
783
|
+
width: 100%;
|
|
695
784
|
}
|
|
696
785
|
}
|
|
697
786
|
|
|
@@ -732,7 +821,7 @@ table.semanticForms.light {
|
|
|
732
821
|
// subtext
|
|
733
822
|
label:nth-of-type(2) {
|
|
734
823
|
margin-top: -5px;
|
|
735
|
-
padding
|
|
824
|
+
padding: 0 10px;
|
|
736
825
|
font-size: small;
|
|
737
826
|
color: var(--semanticFormsTextColor);
|
|
738
827
|
}
|
|
@@ -795,30 +884,15 @@ table.semanticForms.light {
|
|
|
795
884
|
align-items: center;
|
|
796
885
|
gap: 5px;
|
|
797
886
|
|
|
798
|
-
// TODO: same as below
|
|
799
|
-
// &:has(span.help) {
|
|
800
|
-
// width: 80%;
|
|
801
|
-
// padding-right: 20px;
|
|
802
|
-
// }
|
|
803
|
-
|
|
804
|
-
// &:has(span.required) {
|
|
805
|
-
// width: 80%;
|
|
806
|
-
// padding-right: 10px;
|
|
807
|
-
// }
|
|
808
|
-
|
|
809
887
|
span.required {
|
|
810
|
-
// TODO: this places the required asterisk too far to the right when the float label is shrunk
|
|
811
|
-
// position: absolute;
|
|
812
|
-
// right: 0;
|
|
813
888
|
cursor: help;
|
|
814
889
|
pointer-events: auto;
|
|
815
890
|
color: red;
|
|
816
891
|
}
|
|
817
892
|
|
|
818
893
|
span.help {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
// right: 0;
|
|
894
|
+
display: grid;
|
|
895
|
+
place-items: center;
|
|
822
896
|
cursor: help;
|
|
823
897
|
pointer-events: auto;
|
|
824
898
|
|
|
@@ -826,16 +900,23 @@ table.semanticForms.light {
|
|
|
826
900
|
width: 80%;
|
|
827
901
|
}
|
|
828
902
|
}
|
|
903
|
+
}
|
|
829
904
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
905
|
+
.focus-key {
|
|
906
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
907
|
+
position: absolute;
|
|
908
|
+
top: calc(var(--semanticFormsInputTopMargin) + 11px);
|
|
909
|
+
right: 20px;
|
|
834
910
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
911
|
+
kbd {
|
|
912
|
+
line-height: 1;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
&:has(input[type="number"]) {
|
|
917
|
+
.focus-key {
|
|
918
|
+
right: 45px;
|
|
919
|
+
}
|
|
839
920
|
}
|
|
840
921
|
}
|
|
841
922
|
|
|
@@ -844,6 +925,9 @@ table.semanticForms.light {
|
|
|
844
925
|
position: relative;
|
|
845
926
|
|
|
846
927
|
label {
|
|
928
|
+
display: flex;
|
|
929
|
+
align-items: center;
|
|
930
|
+
gap: 5px;
|
|
847
931
|
z-index: 2; // ensure the hoverable icon is interactable
|
|
848
932
|
user-select: auto;
|
|
849
933
|
color: var(--semanticFormsTextColor);
|
|
@@ -857,16 +941,11 @@ table.semanticForms.light {
|
|
|
857
941
|
overflow: hidden;
|
|
858
942
|
text-overflow: ellipsis;
|
|
859
943
|
min-width: 0;
|
|
860
|
-
width:
|
|
861
|
-
|
|
862
|
-
// TODO: remove this? // &:has(span.help) {
|
|
863
|
-
// width: 100%;
|
|
864
|
-
// padding-right: 20px;
|
|
865
|
-
// }
|
|
944
|
+
width: 100%;
|
|
866
945
|
|
|
867
946
|
span.help {
|
|
868
|
-
|
|
869
|
-
|
|
947
|
+
display: grid;
|
|
948
|
+
place-items: center;
|
|
870
949
|
cursor: help;
|
|
871
950
|
pointer-events: auto;
|
|
872
951
|
}
|
|
@@ -881,14 +960,28 @@ table.semanticForms.light {
|
|
|
881
960
|
}
|
|
882
961
|
|
|
883
962
|
label > span {
|
|
884
|
-
// TODO: remove this? // position: absolute;
|
|
885
|
-
// right: 0;
|
|
886
963
|
margin-left: 5px;
|
|
887
964
|
cursor: help;
|
|
888
965
|
pointer-events: auto;
|
|
889
966
|
color: red;
|
|
890
967
|
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
// data-max-content CSS
|
|
972
|
+
&:has([data-max-content]) {
|
|
973
|
+
max-width: max-content;
|
|
974
|
+
min-width: 150px;
|
|
891
975
|
|
|
976
|
+
dd {
|
|
977
|
+
width: max-content;
|
|
978
|
+
|
|
979
|
+
input, select {
|
|
980
|
+
// this is not currently supported in FireFox or Safari, and is progressively enhanced with JS
|
|
981
|
+
field-sizing: content;
|
|
982
|
+
min-width: 150px;
|
|
983
|
+
max-width: max-content;
|
|
984
|
+
}
|
|
892
985
|
}
|
|
893
986
|
}
|
|
894
987
|
}
|
|
@@ -902,84 +995,92 @@ table.semanticForms.light {
|
|
|
902
995
|
// #endregion
|
|
903
996
|
}
|
|
904
997
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
&.colspan-full {
|
|
913
|
-
grid-column: 1 / -1;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
&.colspan-5 {
|
|
917
|
-
grid-column: span 5;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
&.colspan-4 {
|
|
921
|
-
grid-column: span 4;
|
|
922
|
-
}
|
|
998
|
+
// #region colspan classes
|
|
999
|
+
div {
|
|
1000
|
+
&[class^='colspan-'] {
|
|
1001
|
+
max-width: 100%;
|
|
1002
|
+
}
|
|
923
1003
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1004
|
+
&.colspan-full {
|
|
1005
|
+
grid-column: 1 / -1;
|
|
1006
|
+
}
|
|
927
1007
|
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
1008
|
+
&.colspan-5 {
|
|
1009
|
+
grid-column: span 5;
|
|
1010
|
+
}
|
|
931
1011
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}
|
|
1012
|
+
&.colspan-4 {
|
|
1013
|
+
grid-column: span 4;
|
|
935
1014
|
}
|
|
936
1015
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
div {
|
|
940
|
-
max-width: 100%;
|
|
941
|
-
}
|
|
1016
|
+
&.colspan-3 {
|
|
1017
|
+
grid-column: span 3;
|
|
942
1018
|
}
|
|
943
1019
|
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1020
|
+
&.colspan-2 {
|
|
1021
|
+
grid-column: span 2;
|
|
947
1022
|
}
|
|
948
1023
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1024
|
+
&.colspan-1 {
|
|
1025
|
+
grid-column: span 1;
|
|
952
1026
|
}
|
|
1027
|
+
}
|
|
953
1028
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1029
|
+
fieldset[class^='colspan-'] dl,
|
|
1030
|
+
dl[class^='colspan-'] {
|
|
1031
|
+
div {
|
|
1032
|
+
max-width: 100%;
|
|
957
1033
|
}
|
|
1034
|
+
}
|
|
958
1035
|
|
|
1036
|
+
fieldset.colspan-full dl,
|
|
1037
|
+
dl.colspan-full {
|
|
1038
|
+
grid-template-columns: repeat(auto-fit, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1039
|
+
}
|
|
959
1040
|
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1041
|
+
fieldset.colspan-5 dl,
|
|
1042
|
+
dl.colspan-5 {
|
|
1043
|
+
grid-template-columns: repeat(5, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1044
|
+
}
|
|
964
1045
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1046
|
+
fieldset.colspan-4 dl,
|
|
1047
|
+
dl.colspan-4 {
|
|
1048
|
+
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1049
|
+
}
|
|
969
1050
|
|
|
970
|
-
fieldset.colspan-1 dl,
|
|
971
|
-
dl.colspan-1 {
|
|
972
|
-
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
973
|
-
}
|
|
974
|
-
// #endregion
|
|
975
1051
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1052
|
+
fieldset.colspan-3 dl,
|
|
1053
|
+
dl.colspan-3 {
|
|
1054
|
+
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
fieldset.colspan-2 dl,
|
|
1058
|
+
dl.colspan-2 {
|
|
1059
|
+
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
fieldset.colspan-1 dl,
|
|
1063
|
+
dl.colspan-1 {
|
|
1064
|
+
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1065
|
+
}
|
|
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
|
+
}
|
|
982
1079
|
|
|
1080
|
+
&.lowFlow,
|
|
1081
|
+
&:not(.semanticFormsActive) {
|
|
1082
|
+
& fieldset dl,
|
|
1083
|
+
& dl {
|
|
983
1084
|
& dt:nth-of-type(6n + 1),
|
|
984
1085
|
& dd:nth-of-type(6n + 1) {
|
|
985
1086
|
grid-column: 1;
|
|
@@ -1011,12 +1112,23 @@ table.semanticForms.light {
|
|
|
1011
1112
|
}
|
|
1012
1113
|
}
|
|
1013
1114
|
}
|
|
1115
|
+
}
|
|
1014
1116
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
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;
|
|
1019
1122
|
|
|
1123
|
+
div {
|
|
1124
|
+
max-width: 100% !important;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
&.lowFlow,
|
|
1129
|
+
&:not(.semanticFormsActive) {
|
|
1130
|
+
& fieldset dl,
|
|
1131
|
+
& dl {
|
|
1020
1132
|
& dt:nth-of-type(5n + 1),
|
|
1021
1133
|
& dd:nth-of-type(5n + 1) {
|
|
1022
1134
|
grid-column: 1;
|
|
@@ -1043,23 +1155,26 @@ table.semanticForms.light {
|
|
|
1043
1155
|
}
|
|
1044
1156
|
}
|
|
1045
1157
|
}
|
|
1158
|
+
}
|
|
1046
1159
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
grid-column: span 4 !important;
|
|
1055
|
-
}
|
|
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;
|
|
1166
|
+
}
|
|
1056
1167
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
&.lowFlow dl.colspan-5 {
|
|
1061
|
-
grid-template-columns: repeat(4, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1168
|
+
div.colspan-5 {
|
|
1169
|
+
grid-column: span 4 !important;
|
|
1170
|
+
}
|
|
1062
1171
|
|
|
1172
|
+
&.lowFlow,
|
|
1173
|
+
&:not(.semanticFormsActive) {
|
|
1174
|
+
& fieldset dl,
|
|
1175
|
+
& fieldset.colspan-5 dl,
|
|
1176
|
+
& dl,
|
|
1177
|
+
& dl.colspan-5 {
|
|
1063
1178
|
& dt:nth-of-type(4n + 1),
|
|
1064
1179
|
& dd:nth-of-type(4n + 1) {
|
|
1065
1180
|
grid-column: 1;
|
|
@@ -1081,27 +1196,32 @@ table.semanticForms.light {
|
|
|
1081
1196
|
}
|
|
1082
1197
|
}
|
|
1083
1198
|
}
|
|
1199
|
+
}
|
|
1084
1200
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
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
|
+
}
|
|
1092
1211
|
|
|
1093
|
-
div.colspan-4, div.colspan-5 {
|
|
1094
|
-
grid-column: span 3 !important;
|
|
1095
|
-
}
|
|
1096
1212
|
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
&.lowFlow dl.colspan-4,
|
|
1101
|
-
&.lowFlow fieldset.colspan-5 dl,
|
|
1102
|
-
&.lowFlow dl.colspan-5 {
|
|
1103
|
-
grid-template-columns: repeat(3, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1213
|
+
div.colspan-4, div.colspan-5 {
|
|
1214
|
+
grid-column: span 3 !important;
|
|
1215
|
+
}
|
|
1104
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 {
|
|
1105
1225
|
& dt:nth-of-type(3n + 1),
|
|
1106
1226
|
& dd:nth-of-type(3n + 1) {
|
|
1107
1227
|
grid-column: 1;
|
|
@@ -1118,33 +1238,41 @@ table.semanticForms.light {
|
|
|
1118
1238
|
}
|
|
1119
1239
|
}
|
|
1120
1240
|
}
|
|
1241
|
+
}
|
|
1121
1242
|
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
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;
|
|
1254
|
+
}
|
|
1131
1255
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
grid-column: span 2 !important;
|
|
1136
|
-
}
|
|
1256
|
+
div {
|
|
1257
|
+
max-width: 100% !important;
|
|
1258
|
+
}
|
|
1137
1259
|
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
&.lowFlow dl.colspan-4,
|
|
1144
|
-
&.lowFlow fieldset.colspan-5 dl,
|
|
1145
|
-
&.lowFlow dl.colspan-5 {
|
|
1146
|
-
grid-template-columns: repeat(2, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1260
|
+
div.colspan-3,
|
|
1261
|
+
div.colspan-4,
|
|
1262
|
+
div.colspan-5 {
|
|
1263
|
+
grid-column: span 2 !important;
|
|
1264
|
+
}
|
|
1147
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 {
|
|
1148
1276
|
& dt:nth-of-type(2n + 1),
|
|
1149
1277
|
& dd:nth-of-type(2n + 1) {
|
|
1150
1278
|
grid-column: 1;
|
|
@@ -1156,112 +1284,220 @@ table.semanticForms.light {
|
|
|
1156
1284
|
}
|
|
1157
1285
|
}
|
|
1158
1286
|
}
|
|
1287
|
+
}
|
|
1159
1288
|
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
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;
|
|
1303
|
+
}
|
|
1172
1304
|
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1305
|
+
div {
|
|
1306
|
+
max-width: 100% !important;
|
|
1307
|
+
}
|
|
1176
1308
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
&.lowFlow dl.colspan-2,
|
|
1181
|
-
&.lowFlow fieldset.colspan-3 dl,
|
|
1182
|
-
&.lowFlow dl.colspan-3,
|
|
1183
|
-
&.lowFlow fieldset.colspan-4 dl,
|
|
1184
|
-
&.lowFlow dl.colspan-4,
|
|
1185
|
-
&.lowFlow fieldset.colspan-5 dl,
|
|
1186
|
-
&.lowFlow dl.colspan-5 {
|
|
1187
|
-
grid-template-columns: repeat(1, minmax(var(--semanticFormsInputMinWidth), 1fr));
|
|
1309
|
+
div.colspan-2, div.colspan-3, div.colspan-4, div.colspan-5 {
|
|
1310
|
+
grid-column: span 1 !important;
|
|
1311
|
+
}
|
|
1188
1312
|
|
|
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 {
|
|
1189
1325
|
& dt:nth-of-type(n + 1),
|
|
1190
1326
|
& dd:nth-of-type(n + 1) {
|
|
1191
1327
|
grid-column: 1;
|
|
1192
1328
|
}
|
|
1193
1329
|
}
|
|
1194
1330
|
}
|
|
1195
|
-
|
|
1331
|
+
}
|
|
1332
|
+
// #endregion
|
|
1196
1333
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1334
|
+
// #region low flow form
|
|
1335
|
+
&.lowFlow,
|
|
1336
|
+
&:not(.semanticFormsActive) {
|
|
1337
|
+
gap: 10px;
|
|
1338
|
+
|
|
1339
|
+
dl {
|
|
1340
|
+
grid-auto-flow: dense;
|
|
1341
|
+
gap: 0 10px;
|
|
1342
|
+
margin-bottom: 0px;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
// 1, 4, 7, ...
|
|
1346
|
+
& > dt:nth-of-type(2n + 1),
|
|
1347
|
+
& > dd:nth-of-type(2n + 1) {
|
|
1348
|
+
grid-column: 1;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
// 2, 5, 8, ...
|
|
1352
|
+
& > dt:nth-of-type(2n + 2),
|
|
1353
|
+
& > dd:nth-of-type(2n + 2) {
|
|
1354
|
+
grid-column: 2;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
dt {
|
|
1358
|
+
min-width: var(--semanticFormsInputMinWidth) !important; /* this matches the max-width of js-enabled inputs */
|
|
1200
1359
|
|
|
1201
|
-
|
|
1202
|
-
|
|
1360
|
+
label {
|
|
1361
|
+
position: absolute;
|
|
1362
|
+
display: block;
|
|
1363
|
+
height: 11px;
|
|
1364
|
+
transform: scale(0.7);
|
|
1365
|
+
transform-origin: left center;
|
|
1366
|
+
padding-left: 29px;
|
|
1367
|
+
margin-top: -1px;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
// add required asterisk
|
|
1371
|
+
&:has(+ dd input:required) {
|
|
1372
|
+
label::after {
|
|
1373
|
+
content: ' *';
|
|
1374
|
+
color: red;
|
|
1203
1375
|
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1204
1378
|
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1379
|
+
// checkbox/radio groups
|
|
1380
|
+
dt {
|
|
1381
|
+
&:has(+ dd.checkboxes),
|
|
1382
|
+
&:has(+ dd.radios) {
|
|
1383
|
+
label {
|
|
1384
|
+
padding-left: 15px;
|
|
1209
1385
|
}
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1210
1388
|
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1389
|
+
// single checkbox label
|
|
1390
|
+
dt {
|
|
1391
|
+
&:not(:has(+ dd ul)){
|
|
1392
|
+
&:has(+ dd input[type=checkbox]) {
|
|
1393
|
+
label {
|
|
1394
|
+
transform: scale(1);
|
|
1395
|
+
margin-top: 4px;
|
|
1396
|
+
margin-left: 8px;
|
|
1397
|
+
}
|
|
1215
1398
|
}
|
|
1216
1399
|
|
|
1217
|
-
|
|
1218
|
-
|
|
1400
|
+
&:has(+ dd input[type=radio]) {
|
|
1401
|
+
label {
|
|
1402
|
+
transform: scale(1);
|
|
1403
|
+
margin-top: 2px;
|
|
1404
|
+
margin-left: 8px;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1219
1409
|
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1410
|
+
|
|
1411
|
+
dd {
|
|
1412
|
+
// margin-bottom: 10px;
|
|
1413
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
1414
|
+
margin-bottom: 10px;
|
|
1415
|
+
min-width: var(--semanticFormsInputMinWidth) !important; /* this matches the max-width of js-enabled inputs */
|
|
1416
|
+
|
|
1417
|
+
// checkbox/radio groups
|
|
1418
|
+
&.checkboxes,
|
|
1419
|
+
&.radios {
|
|
1420
|
+
margin-top: 0;
|
|
1421
|
+
|
|
1422
|
+
ul {
|
|
1423
|
+
input[type=radio] {
|
|
1424
|
+
margin-top: 3px;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
label {
|
|
1428
|
+
padding-top: 7px;
|
|
1429
|
+
padding-left: 0;
|
|
1430
|
+
font-size: var(--semanticFormsFontSize);
|
|
1226
1431
|
}
|
|
1227
1432
|
}
|
|
1228
1433
|
|
|
1434
|
+
// additional text
|
|
1435
|
+
ul + label {
|
|
1436
|
+
margin-top: 0;
|
|
1437
|
+
font-size: small;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1229
1440
|
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1441
|
+
// single checkbox/radio
|
|
1442
|
+
&:not(:has(ul)){
|
|
1443
|
+
&:has(input[type=checkbox], input[type=radio]) {
|
|
1444
|
+
margin-top: 0;
|
|
1445
|
+
padding-left: 10px;
|
|
1233
1446
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
margin-left: 10px;
|
|
1238
|
-
}
|
|
1447
|
+
input[type=checkbox] {
|
|
1448
|
+
margin-left: 1px;
|
|
1449
|
+
margin-top: 2px;
|
|
1239
1450
|
}
|
|
1240
1451
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
textarea {
|
|
1245
|
-
padding-right: 6px;
|
|
1452
|
+
input[type=radio] {
|
|
1453
|
+
margin-left: 1px;
|
|
1454
|
+
margin-top: 1px;
|
|
1246
1455
|
}
|
|
1247
1456
|
|
|
1248
|
-
//
|
|
1457
|
+
// additional info text
|
|
1249
1458
|
label {
|
|
1250
|
-
margin-top: -5px;
|
|
1251
1459
|
font-size: small;
|
|
1252
|
-
|
|
1460
|
+
margin-top: -1px;
|
|
1461
|
+
padding-left: 11px;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
input[type=radio] + label {
|
|
1465
|
+
margin-top: -4px;
|
|
1253
1466
|
}
|
|
1254
1467
|
}
|
|
1255
1468
|
}
|
|
1256
1469
|
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1470
|
+
// remove "x" padding
|
|
1471
|
+
input:not([type=submit], [type=reset], [type=image], [type=checkbox], [type=radio], [type=range]),
|
|
1472
|
+
select,
|
|
1473
|
+
textarea {
|
|
1474
|
+
padding-right: 6px;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
// subtext
|
|
1478
|
+
label {
|
|
1479
|
+
padding-left: 10px;
|
|
1480
|
+
margin-top: -5px;
|
|
1481
|
+
font-size: small;
|
|
1482
|
+
color: var(--semanticFormsPlaceholderColor);
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
// inline buttons
|
|
1486
|
+
button:not(.clear, .show),
|
|
1487
|
+
input[type="submit"]:not(.clear, .show),
|
|
1488
|
+
input[type="button"]:not(.clear, .show) {
|
|
1489
|
+
margin-top: 0 !important;
|
|
1260
1490
|
}
|
|
1261
1491
|
}
|
|
1262
|
-
// #endregion
|
|
1263
1492
|
}
|
|
1264
1493
|
|
|
1494
|
+
.checkboxes ul,
|
|
1495
|
+
.radios ul {
|
|
1496
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
1497
|
+
}
|
|
1498
|
+
// #endregion
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1265
1501
|
// #region tables
|
|
1266
1502
|
|
|
1267
1503
|
.semanticForms table,
|