@cirthcss/cirth 0.6.0 → 0.8.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.
@@ -41,55 +41,48 @@
41
41
  }
42
42
 
43
43
  .cirth .container, .cirth .container-fluid {
44
- width: 100%;
45
- padding-inline: var(--cirth-spacing);
46
- margin-inline: auto;
47
- }
48
-
49
- @media (min-width: 576px) {
50
- .cirth .container {
51
- max-width: 510px;
52
- padding-inline: 0;
53
- }
44
+ grid-template-columns: minmax(var(--cirth-spacing), 1fr) minmax(0, 1fr) minmax(var(--cirth-spacing), 1fr);
45
+ display: grid;
54
46
  }
55
47
 
56
- @media (min-width: 768px) {
57
- .cirth .container {
58
- max-width: 700px;
59
- }
48
+ .cirth .container > *, .cirth .container-fluid > * {
49
+ grid-column: 2;
60
50
  }
61
51
 
62
- @media (min-width: 1024px) {
63
- .cirth .container {
64
- max-width: 950px;
65
- }
52
+ .cirth .container {
53
+ grid-template-columns: minmax(var(--cirth-spacing), 1fr) minmax(0, var(--cirth-container-max-width)) minmax(var(--cirth-spacing), 1fr);
66
54
  }
67
55
 
68
- @media (min-width: 1280px) {
69
- .cirth .container {
70
- max-width: 1200px;
71
- }
56
+ .cirth .breakout {
57
+ grid-column: 1 / -1;
72
58
  }
73
59
 
74
- @media (min-width: 1536px) {
75
- .cirth .container {
76
- max-width: 1450px;
77
- }
78
- }
79
-
80
- .cirth .grid {
81
- grid-column-gap: var(--cirth-grid-column-gap);
82
- grid-row-gap: var(--cirth-grid-row-gap);
60
+ .cirth .row {
61
+ gap: var(--cirth-grid-row-gap) var(--cirth-grid-column-gap);
83
62
  grid-template-columns: 1fr;
84
63
  display: grid;
85
64
  }
86
65
 
87
66
  @media (min-width: 768px) {
88
- .cirth .grid {
67
+ .cirth .row {
89
68
  grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
90
69
  }
91
70
  }
92
71
 
72
+ .cirth .row > * {
73
+ min-width: 0;
74
+ }
75
+
76
+ .cirth .row > :where(button, [type="submit"], [type="reset"], [role="button"], input:not([type="checkbox"], [type="radio"]), select, textarea) {
77
+ margin-bottom: 0;
78
+ }
79
+
80
+ .cirth .grid {
81
+ gap: var(--cirth-grid-row-gap) var(--cirth-grid-column-gap);
82
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--cirth-grid-min-column)), 1fr));
83
+ display: grid;
84
+ }
85
+
93
86
  .cirth .grid > * {
94
87
  min-width: 0;
95
88
  }
@@ -293,7 +286,6 @@
293
286
  text-transform: none;
294
287
  margin: 0;
295
288
  font-family: inherit;
296
- overflow: visible;
297
289
  }
298
290
 
299
291
  .cirth button, .cirth [type="submit"], .cirth [type="reset"], .cirth [type="button"] {
@@ -496,6 +488,7 @@
496
488
  border-collapse: collapse;
497
489
  border-spacing: 0;
498
490
  text-indent: 0;
491
+ border-color: currentColor;
499
492
  width: 100%;
500
493
  }
501
494
 
@@ -521,21 +514,11 @@
521
514
  vertical-align: middle;
522
515
  }
523
516
 
524
- .cirth audio, .cirth video {
525
- display: inline-block;
526
- }
527
-
528
- .cirth audio:not([controls]) {
529
- height: 0;
530
- display: none;
531
- }
532
-
533
517
  .cirth :where(iframe) {
534
518
  border-style: none;
535
519
  }
536
520
 
537
521
  .cirth img {
538
- border-style: none;
539
522
  max-width: 100%;
540
523
  }
541
524
 
@@ -547,10 +530,6 @@
547
530
  fill: currentColor;
548
531
  }
549
532
 
550
- .cirth svg:not(:root), .cirth svg:not(:host) {
551
- overflow: hidden;
552
- }
553
-
554
533
  .cirth pre, .cirth code, .cirth kbd, .cirth samp {
555
534
  font-size: .875em;
556
535
  font-family: var(--cirth-font-family);
@@ -562,7 +541,6 @@
562
541
  }
563
542
 
564
543
  .cirth pre {
565
- -ms-overflow-style: scrollbar;
566
544
  overflow: auto;
567
545
  }
568
546
 
@@ -624,14 +602,10 @@
624
602
  color: inherit;
625
603
  }
626
604
 
627
- .cirth [hidden], .cirth template {
605
+ .cirth [hidden]:where(:not([hidden="until-found"])) {
628
606
  display: none;
629
607
  }
630
608
 
631
- .cirth canvas {
632
- display: inline-block;
633
- }
634
-
635
609
  .cirth input, .cirth optgroup, .cirth select, .cirth textarea {
636
610
  font-size: var(--cirth-font-size-md);
637
611
  line-height: var(--cirth-line-height);
@@ -640,26 +614,7 @@
640
614
  font-family: inherit;
641
615
  }
642
616
 
643
- .cirth input {
644
- overflow: visible;
645
- }
646
-
647
- .cirth select {
648
- text-transform: none;
649
- }
650
-
651
617
  .cirth legend {
652
- max-width: 100%;
653
- color: inherit;
654
- white-space: normal;
655
- padding: 0;
656
- }
657
-
658
- .cirth textarea {
659
- overflow: auto;
660
- }
661
-
662
- .cirth [type="checkbox"], .cirth [type="radio"] {
663
618
  padding: 0;
664
619
  }
665
620
 
@@ -680,28 +635,15 @@
680
635
  -webkit-appearance: none;
681
636
  }
682
637
 
683
- .cirth ::-webkit-file-upload-button {
638
+ .cirth ::file-selector-button {
684
639
  -webkit-appearance: button;
685
640
  font: inherit;
686
641
  }
687
642
 
688
- .cirth ::-moz-focus-inner {
689
- border-style: none;
690
- padding: 0;
691
- }
692
-
693
- .cirth :-moz-focusring {
694
- outline: none;
695
- }
696
-
697
643
  .cirth :-moz-ui-invalid {
698
644
  box-shadow: none;
699
645
  }
700
646
 
701
- .cirth ::-ms-expand {
702
- display: none;
703
- }
704
-
705
647
  .cirth [type="file"], .cirth [type="range"] {
706
648
  border-width: 0;
707
649
  padding: 0;
@@ -778,11 +720,10 @@
778
720
  }
779
721
 
780
722
  .cirth :where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid] {
723
+ padding-inline: var(--cirth-form-element-spacing-horizontal) calc(var(--cirth-form-element-spacing-horizontal) + var(--cirth-space-6));
781
724
  background-position: center right var(--cirth-space-3);
782
725
  background-size: var(--cirth-size-4) auto;
783
726
  background-repeat: no-repeat;
784
- padding-inline-start: var(--cirth-form-element-spacing-horizontal);
785
- padding-inline-end: calc(var(--cirth-form-element-spacing-horizontal) + var(--cirth-space-6));
786
727
  }
787
728
 
788
729
  .cirth :where(input, select, textarea):not([type="checkbox"], [type="radio"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], [type="range"])[aria-invalid="false"]:not(select) {
@@ -832,32 +773,16 @@
832
773
  opacity: 1;
833
774
  }
834
775
 
835
- .cirth input::-webkit-input-placeholder {
836
- color: var(--cirth-form-element-placeholder-color);
837
- opacity: 1;
838
- }
839
-
840
- .cirth textarea::-webkit-input-placeholder {
841
- color: var(--cirth-form-element-placeholder-color);
842
- opacity: 1;
843
- }
844
-
845
776
  .cirth input:not([type="checkbox"], [type="radio"]), .cirth select, .cirth textarea {
846
777
  margin-bottom: var(--cirth-spacing);
847
778
  }
848
779
 
849
- .cirth select::-ms-expand {
850
- background-color: #0000;
851
- border: 0;
852
- }
853
-
854
780
  .cirth select:not([multiple], [size]) {
781
+ padding-inline: var(--cirth-form-element-spacing-horizontal) calc(var(--cirth-form-element-spacing-horizontal) + var(--cirth-space-6));
855
782
  background-image: var(--cirth-icon-chevron);
856
783
  background-position: center right var(--cirth-space-3);
857
784
  background-size: var(--cirth-size-4) auto;
858
785
  background-repeat: no-repeat;
859
- padding-inline-start: var(--cirth-form-element-spacing-horizontal);
860
- padding-inline-end: calc(var(--cirth-form-element-spacing-horizontal) + var(--cirth-space-6));
861
786
  }
862
787
 
863
788
  .cirth select[multiple] option:checked {
@@ -882,7 +807,7 @@
882
807
  background-size: var(--cirth-size-4) var(--cirth-icon-height);
883
808
  }
884
809
 
885
- .cirth :where(input, select, textarea, fieldset, .grid) + small {
810
+ .cirth :where(input, select, textarea, fieldset, .row) + small {
886
811
  width: 100%;
887
812
  margin-top: calc(var(--cirth-spacing) * -.75);
888
813
  margin-bottom: var(--cirth-spacing);
@@ -890,11 +815,11 @@
890
815
  display: block;
891
816
  }
892
817
 
893
- .cirth :where(input, select, textarea, fieldset, .grid)[aria-invalid="false"] + small {
818
+ .cirth :where(input, select, textarea, fieldset, .row)[aria-invalid="false"] + small {
894
819
  color: var(--cirth-ins-color);
895
820
  }
896
821
 
897
- .cirth :where(input, select, textarea, fieldset, .grid)[aria-invalid="true"] + small {
822
+ .cirth :where(input, select, textarea, fieldset, .row)[aria-invalid="true"] + small {
898
823
  color: var(--cirth-del-color);
899
824
  }
900
825
 
@@ -1057,39 +982,42 @@
1057
982
  background-image: var(--cirth-icon-time);
1058
983
  }
1059
984
 
985
+ .cirth ::-webkit-date-and-time-value {
986
+ text-align: inherit;
987
+ }
988
+
989
+ .cirth ::-webkit-datetime-edit {
990
+ padding-block: 0;
991
+ }
992
+
1060
993
  .cirth [type="date"]::-webkit-calendar-picker-indicator {
1061
994
  width: var(--cirth-icon-width);
995
+ margin-inline: var(--cirth-icon-position) calc(var(--cirth-icon-width) * -1);
1062
996
  opacity: 0;
1063
- margin-inline-start: var(--cirth-icon-position);
1064
- margin-inline-end: calc(var(--cirth-icon-width) * -1);
1065
997
  }
1066
998
 
1067
999
  .cirth [type="datetime-local"]::-webkit-calendar-picker-indicator {
1068
1000
  width: var(--cirth-icon-width);
1001
+ margin-inline: var(--cirth-icon-position) calc(var(--cirth-icon-width) * -1);
1069
1002
  opacity: 0;
1070
- margin-inline-start: var(--cirth-icon-position);
1071
- margin-inline-end: calc(var(--cirth-icon-width) * -1);
1072
1003
  }
1073
1004
 
1074
1005
  .cirth [type="month"]::-webkit-calendar-picker-indicator {
1075
1006
  width: var(--cirth-icon-width);
1007
+ margin-inline: var(--cirth-icon-position) calc(var(--cirth-icon-width) * -1);
1076
1008
  opacity: 0;
1077
- margin-inline-start: var(--cirth-icon-position);
1078
- margin-inline-end: calc(var(--cirth-icon-width) * -1);
1079
1009
  }
1080
1010
 
1081
1011
  .cirth [type="time"]::-webkit-calendar-picker-indicator {
1082
1012
  width: var(--cirth-icon-width);
1013
+ margin-inline: var(--cirth-icon-position) calc(var(--cirth-icon-width) * -1);
1083
1014
  opacity: 0;
1084
- margin-inline-start: var(--cirth-icon-position);
1085
- margin-inline-end: calc(var(--cirth-icon-width) * -1);
1086
1015
  }
1087
1016
 
1088
1017
  .cirth [type="week"]::-webkit-calendar-picker-indicator {
1089
1018
  width: var(--cirth-icon-width);
1019
+ margin-inline: var(--cirth-icon-position) calc(var(--cirth-icon-width) * -1);
1090
1020
  opacity: 0;
1091
- margin-inline-start: var(--cirth-icon-position);
1092
- margin-inline-end: calc(var(--cirth-icon-width) * -1);
1093
1021
  }
1094
1022
 
1095
1023
  @-moz-document url-prefix() {
@@ -1829,7 +1757,7 @@
1829
1757
  .cirth.modal-is-open, .cirth .modal-is-open {
1830
1758
  pointer-events: none;
1831
1759
  touch-action: none;
1832
- padding-inline-end: var(--cirth-scrollbar-width, 0px);
1760
+ padding-inline-end: var(--cirth-scrollbar-width, 0);
1833
1761
  overflow: hidden;
1834
1762
  }
1835
1763
 
@@ -2186,7 +2114,7 @@
2186
2114
  opacity: 0;
2187
2115
  }
2188
2116
 
2189
- to {
2117
+ 100% {
2190
2118
  transform: var(--cirth-tooltip-caret-slide-to);
2191
2119
  opacity: 1;
2192
2120
  }
@@ -2205,14 +2133,10 @@
2205
2133
  }
2206
2134
 
2207
2135
  .cirth [aria-hidden="false"][hidden]:not(:focus) {
2208
- clip: rect(0, 0, 0, 0);
2136
+ clip-path: inset(50%);
2209
2137
  position: absolute;
2210
2138
  }
2211
2139
 
2212
- .cirth a, .cirth area, .cirth button, .cirth input, .cirth label, .cirth select, .cirth summary, .cirth textarea, .cirth [tabindex] {
2213
- -ms-touch-action: manipulation;
2214
- }
2215
-
2216
2140
  .cirth [dir="rtl"] {
2217
2141
  direction: rtl;
2218
2142
  }
@@ -2229,6 +2153,34 @@
2229
2153
  }
2230
2154
  }
2231
2155
 
2156
+ .cirth .sr-only {
2157
+ clip-path: inset(50%);
2158
+ white-space: nowrap;
2159
+ border: 0;
2160
+ width: 1px;
2161
+ height: 1px;
2162
+ margin: -1px;
2163
+ padding: 0;
2164
+ position: absolute;
2165
+ overflow: hidden;
2166
+ }
2167
+
2168
+ .cirth .sr-only-focusable:focus, .cirth .sr-only-focusable:focus-within {
2169
+ clip-path: none;
2170
+ white-space: normal;
2171
+ width: auto;
2172
+ height: auto;
2173
+ margin: 0;
2174
+ position: static;
2175
+ overflow: visible;
2176
+ }
2177
+
2178
+ .cirth .truncate {
2179
+ white-space: nowrap;
2180
+ text-overflow: ellipsis;
2181
+ overflow: hidden;
2182
+ }
2183
+
2232
2184
  .cirth {
2233
2185
  --cirth-color-black: #000;
2234
2186
  --cirth-color-white: #fff;
@@ -2341,8 +2293,10 @@
2341
2293
  --cirth-typography-spacing-vertical: var(--cirth-space-4);
2342
2294
  --cirth-block-spacing-vertical: var(--cirth-spacing);
2343
2295
  --cirth-block-spacing-horizontal: var(--cirth-spacing);
2296
+ --cirth-container-max-width: 60rem;
2344
2297
  --cirth-grid-column-gap: var(--cirth-spacing);
2345
2298
  --cirth-grid-row-gap: var(--cirth-spacing);
2299
+ --cirth-grid-min-column: 12rem;
2346
2300
  --cirth-form-element-spacing-vertical: var(--cirth-space-2);
2347
2301
  --cirth-form-element-spacing-horizontal: var(--cirth-space-4);
2348
2302
  --cirth-form-label-font-weight: var(--cirth-font-weight);
@@ -2373,6 +2327,7 @@
2373
2327
 
2374
2328
  .cirth small {
2375
2329
  --cirth-font-size: .875em;
2330
+ font-size: var(--cirth-font-size);
2376
2331
  }
2377
2332
 
2378
2333
  .cirth h1, .cirth h2, .cirth h3 {