semantic-forms 5.1.4 → 5.1.6

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.
@@ -65,7 +65,7 @@ form.semanticForms, form.semanticForms.light, table.semanticForms {
65
65
  @media (prefers-color-scheme: dark) {
66
66
  html:not(.light) {
67
67
  body:not(.light) {
68
- form.semanticForms, table.semanticForms {
68
+ form.semanticForms:not(.light), table.semanticForms:not(.light) {
69
69
  @include dark-mode;
70
70
  }
71
71
  }
@@ -79,6 +79,10 @@ html:not(.light) {
79
79
  }
80
80
  }
81
81
  }
82
+
83
+ form.semanticForms.dark, table.semanticForms.dark {
84
+ @include dark-mode;
85
+ }
82
86
  // #endregion
83
87
 
84
88
  form.semanticForms,
@@ -128,6 +132,10 @@ table.semanticForms.light {
128
132
  touch-action: manipulation;
129
133
  outline: none;
130
134
 
135
+ &:not([type="range"]):placeholder-shown {
136
+ padding: 6px 20px;
137
+ }
138
+
131
139
  &:not([type="range"]) {
132
140
  padding: 6px 30px 6px 20px;
133
141
  }
@@ -136,6 +144,11 @@ table.semanticForms.light {
136
144
  padding: 6px 55px 6px 20px;
137
145
  }
138
146
 
147
+ &[type="range"],
148
+ &[type="color"] {
149
+ cursor: pointer;
150
+ }
151
+
139
152
  &[disabled] {
140
153
  cursor: not-allowed;
141
154
  opacity: 0.5;
@@ -226,9 +239,9 @@ table.semanticForms.light {
226
239
 
227
240
  textarea {
228
241
  resize: vertical;
242
+ line-height: 1.5;
229
243
  width: 100%;
230
244
  min-height: 38px;
231
- height: 100px;
232
245
  }
233
246
 
234
247
  input[type="search"] {
@@ -305,7 +318,8 @@ table.semanticForms.light {
305
318
  max-width: max-content;
306
319
  background-image: linear-gradient(to bottom, var(--semanticFormsButtonGradientLight) 0%, var(--semanticFormsButtonGradientDark) 100%);
307
320
  background-origin: border-box; // prevents graphical errors in Firefox
308
- border: 2px var(--semanticFormsButtonGradientDark) solid;
321
+ border: 1px var(--semanticFormsButtonGradientDark) solid;
322
+ corner-shape: squircle;
309
323
  border-radius: 20px;
310
324
  padding: 5px 25px;
311
325
  font-size: 100%;
@@ -537,6 +551,10 @@ table.semanticForms.light {
537
551
  // shift text down to match center
538
552
  padding-top: 2px;
539
553
  font-size: var(--semanticFormsInputFontSize);
554
+ cursor: pointer;
555
+ display: flex;
556
+ align-items: center;
557
+ gap: 5px;
540
558
 
541
559
  span.required {
542
560
  cursor: help;
@@ -547,6 +565,10 @@ table.semanticForms.light {
547
565
  span.help {
548
566
  cursor: help;
549
567
  pointer-events: auto;
568
+
569
+ svg {
570
+ width: 80%;
571
+ }
550
572
  }
551
573
  }
552
574
 
@@ -564,8 +586,8 @@ table.semanticForms.light {
564
586
  input:not([type='submit'], [type='reset'], [type='image']),
565
587
  select,
566
588
  textarea {
567
- &:focus:not([type=checkbox], [type=radio]) ~ label:first-of-type,
568
- &:not(:placeholder-shown, [type=checkbox], [type=radio]) ~ label:first-of-type {
589
+ &:focus:not([type=checkbox], [type=radio], .no-float-label) ~ label:first-of-type,
590
+ &:not(:placeholder-shown):not(.no-float-label):not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
569
591
  color: var(--semanticFormsTextColor) !important;
570
592
  // TODO: finish this work on making the help icon responsive
571
593
  // width: 100%;
@@ -580,6 +602,16 @@ table.semanticForms.light {
580
602
  }
581
603
  }
582
604
 
605
+ // hide float label if no-float-label class is present
606
+ input:not([type='submit'], [type='reset'], [type='image']),
607
+ select,
608
+ textarea {
609
+ &:focus.no-float-label ~ label:first-of-type,
610
+ &:not(:placeholder-shown).no-float-label:not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
611
+ display: none;
612
+ }
613
+ }
614
+
583
615
  select ~ label:first-of-type {
584
616
  // force label to be correct color
585
617
  color: var(--semanticFormsTextColor) !important;
@@ -666,6 +698,9 @@ table.semanticForms.light {
666
698
  user-select: none;
667
699
  color: var(--semanticFormsPlaceholderColor);
668
700
  touch-action: manipulation;
701
+ display: flex;
702
+ align-items: center;
703
+ gap: 5px;
669
704
 
670
705
  // TODO: same as below
671
706
  // &:has(span.help) {
@@ -693,6 +728,10 @@ table.semanticForms.light {
693
728
  // right: 0;
694
729
  cursor: help;
695
730
  pointer-events: auto;
731
+
732
+ svg {
733
+ width: 80%;
734
+ }
696
735
  }
697
736
 
698
737
  // // TODO: cover the case where an input is required AND has help text