Skip to content

Commit b1fcd44

Browse files
committed
Added <label> compatibility to groups
1 parent fe78285 commit b1fcd44

File tree

241 files changed

+10426
-3131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+10426
-3131
lines changed

css/pico.amber.css

Lines changed: 83 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,26 @@ section {
725725
grid-template-columns: repeat(12, 1fr);
726726
gap: var(--pico-grid-row-gap) var(--pico-grid-column-gap);
727727
}
728+
.row-fluid.align-center,
729+
.row.align-center {
730+
align-items: center;
731+
}
732+
.row-fluid.align-start,
733+
.row.align-start {
734+
align-items: start;
735+
}
736+
.row-fluid.align-end,
737+
.row.align-end {
738+
align-items: end;
739+
}
740+
.row-fluid > [class*=col] > *,
741+
.row-fluid > [class|=col] > *,
742+
.row-fluid > [class~=col] > *,
743+
.row > [class*=col] > *,
744+
.row > [class|=col] > *,
745+
.row > [class~=col] > * {
746+
margin: calc(var(--pico-block-spacing-vertical) * 0.5) auto;
747+
}
728748

729749
.row {
730750
max-width: 1200px;
@@ -828,7 +848,7 @@ section {
828848
grid-column-start: 12;
829849
}
830850

831-
@media (max-width: 510px) {
851+
@media (min-width: 510px) {
832852
.col-sm-1 {
833853
grid-column-end: span 1;
834854
}
@@ -902,7 +922,7 @@ section {
902922
grid-column-start: 12;
903923
}
904924
}
905-
@media (max-width: 700px) {
925+
@media (min-width: 700px) {
906926
.col-md-1 {
907927
grid-column-end: span 1;
908928
}
@@ -976,7 +996,7 @@ section {
976996
grid-column-start: 12;
977997
}
978998
}
979-
@media (max-width: 950px) {
999+
@media (min-width: 950px) {
9801000
.col-lg-1 {
9811001
grid-column-end: span 1;
9821002
}
@@ -1050,7 +1070,7 @@ section {
10501070
grid-column-start: 12;
10511071
}
10521072
}
1053-
@media (max-width: 1200px) {
1073+
@media (min-width: 1200px) {
10541074
.col-xl-1 {
10551075
grid-column-end: span 1;
10561076
}
@@ -1124,7 +1144,7 @@ section {
11241144
grid-column-start: 12;
11251145
}
11261146
}
1127-
@media (max-width: 1450px) {
1147+
@media (min-width: 1450px) {
11281148
.col-xxl-1 {
11291149
grid-column-end: span 1;
11301150
}
@@ -1742,7 +1762,8 @@ canvas {
17421762
input,
17431763
optgroup,
17441764
select,
1745-
textarea {
1765+
textarea,
1766+
[role=group] > label {
17461767
margin: 0;
17471768
font-size: 1rem;
17481769
line-height: var(--pico-line-height);
@@ -1816,7 +1837,8 @@ textarea {
18161837
border-width: 0;
18171838
}
18181839

1819-
input:not([type=checkbox], [type=radio], [type=range], [type=date]) {
1840+
input:not([type=checkbox], [type=radio], [type=range], [type=date]),
1841+
[role=group] > label {
18201842
height: calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 + var(--pico-border-width) * 2);
18211843
}
18221844

@@ -1849,7 +1871,8 @@ textarea {
18491871

18501872
input:not([type=checkbox], [type=radio], [type=range], [type=file]),
18511873
select,
1852-
textarea {
1874+
textarea,
1875+
[role=group] > label {
18531876
-webkit-appearance: none;
18541877
-moz-appearance: none;
18551878
appearance: none;
@@ -1858,7 +1881,8 @@ textarea {
18581881

18591882
input,
18601883
select,
1861-
textarea {
1884+
textarea,
1885+
[role=group] > label {
18621886
--pico-background-color: var(--pico-form-element-background-color);
18631887
--pico-border-color: var(--pico-form-element-border-color);
18641888
--pico-color: var(--pico-form-element-color);
@@ -1899,6 +1923,7 @@ input:not([type=submit],
18991923
}
19001924

19011925
input:not([type=submit], [type=button], [type=reset])[disabled],
1926+
[role=group] > label,
19021927
select[disabled],
19031928
textarea[disabled],
19041929
label[aria-disabled=true],
@@ -1907,7 +1932,8 @@ label[aria-disabled=true],
19071932
pointer-events: none;
19081933
}
19091934

1910-
label[aria-disabled=true] input[disabled] {
1935+
label[aria-disabled=true] input[disabled],
1936+
[role=group] > label {
19111937
opacity: 1;
19121938
}
19131939

@@ -1974,14 +2000,16 @@ input::placeholder,
19742000
input::-webkit-input-placeholder,
19752001
textarea::placeholder,
19762002
textarea::-webkit-input-placeholder,
1977-
select:invalid {
2003+
select:invalid,
2004+
[role=group] > label {
19782005
color: var(--pico-form-element-placeholder-color);
19792006
opacity: 1;
19802007
}
19812008

19822009
input:not([type=checkbox], [type=radio]),
19832010
select,
1984-
textarea {
2011+
textarea,
2012+
[role=group] > label {
19852013
margin-bottom: var(--pico-spacing);
19862014
}
19872015

@@ -2376,6 +2404,12 @@ details {
23762404
display: block;
23772405
margin-bottom: var(--pico-spacing);
23782406
}
2407+
details:not([open]) summary ~ * {
2408+
max-height: 0;
2409+
overflow: hidden;
2410+
opacity: 0;
2411+
transition: max-height var(--pico-transition), opacity var(--pico-transition);
2412+
}
23792413
details summary {
23802414
line-height: 1rem;
23812415
list-style-type: none;
@@ -2435,6 +2469,11 @@ details[open] > summary:not([role]):not(:focus) {
24352469
details[open] > summary::after {
24362470
transform: rotate(0);
24372471
}
2472+
details[open] > summary ~ * {
2473+
max-height: 100; /* Initial max height for content */
2474+
opacity: 1;
2475+
transition: max-height var(--pico-transition), opacity var(--pico-transition);
2476+
}
24382477

24392478
[dir=rtl] details summary {
24402479
text-align: right;
@@ -2650,41 +2689,54 @@ label > details.dropdown {
26502689
vertical-align: middle;
26512690
transition: box-shadow var(--pico-transition);
26522691
}
2692+
[role=search] > label,
2693+
[role=group] > label {
2694+
background-color: var(--pico-secondary-background);
2695+
color: var(--pico-secondary-inverse);
2696+
}
26532697
[role=search] > *,
26542698
[role=search] input:not([type=checkbox], [type=radio]),
26552699
[role=search] select,
2700+
[role=search] label,
26562701
[role=group] > *,
26572702
[role=group] input:not([type=checkbox], [type=radio]),
2658-
[role=group] select {
2703+
[role=group] select,
2704+
[role=group] label {
26592705
position: relative;
26602706
flex: 1 1 auto;
26612707
margin-bottom: 0;
26622708
}
26632709
[role=search] > *:not(:first-child),
26642710
[role=search] input:not([type=checkbox], [type=radio]):not(:first-child),
26652711
[role=search] select:not(:first-child),
2712+
[role=search] label:not(:first-child),
26662713
[role=group] > *:not(:first-child),
26672714
[role=group] input:not([type=checkbox], [type=radio]):not(:first-child),
2668-
[role=group] select:not(:first-child) {
2715+
[role=group] select:not(:first-child),
2716+
[role=group] label:not(:first-child) {
26692717
margin-left: 0;
26702718
border-top-left-radius: 0;
26712719
border-bottom-left-radius: 0;
26722720
}
26732721
[role=search] > *:not(:last-child),
26742722
[role=search] input:not([type=checkbox], [type=radio]):not(:last-child),
26752723
[role=search] select:not(:last-child),
2724+
[role=search] label:not(:last-child),
26762725
[role=group] > *:not(:last-child),
26772726
[role=group] input:not([type=checkbox], [type=radio]):not(:last-child),
2678-
[role=group] select:not(:last-child) {
2727+
[role=group] select:not(:last-child),
2728+
[role=group] label:not(:last-child) {
26792729
border-top-right-radius: 0;
26802730
border-bottom-right-radius: 0;
26812731
}
26822732
[role=search] > *:focus,
26832733
[role=search] input:not([type=checkbox], [type=radio]):focus,
26842734
[role=search] select:focus,
2735+
[role=search] label:focus,
26852736
[role=group] > *:focus,
26862737
[role=group] input:not([type=checkbox], [type=radio]):focus,
2687-
[role=group] select:focus {
2738+
[role=group] select:focus,
2739+
[role=group] label:focus {
26882740
z-index: 2;
26892741
}
26902742
[role=search] button:not(:first-child),
@@ -2694,25 +2746,29 @@ label > details.dropdown {
26942746
[role=search] [role=button]:not(:first-child),
26952747
[role=search] input:not([type=checkbox], [type=radio]):not(:first-child),
26962748
[role=search] select:not(:first-child),
2749+
[role=search] label:not(:first-child),
26972750
[role=group] button:not(:first-child),
26982751
[role=group] [type=submit]:not(:first-child),
26992752
[role=group] [type=reset]:not(:first-child),
27002753
[role=group] [type=button]:not(:first-child),
27012754
[role=group] [role=button]:not(:first-child),
27022755
[role=group] input:not([type=checkbox], [type=radio]):not(:first-child),
2703-
[role=group] select:not(:first-child) {
2756+
[role=group] select:not(:first-child),
2757+
[role=group] label:not(:first-child) {
27042758
margin-left: calc(var(--pico-border-width) * -1);
27052759
}
27062760
[role=search] button,
27072761
[role=search] [type=submit],
27082762
[role=search] [type=reset],
27092763
[role=search] [type=button],
27102764
[role=search] [role=button],
2765+
[role=search] label,
27112766
[role=group] button,
27122767
[role=group] [type=submit],
27132768
[role=group] [type=reset],
27142769
[role=group] [type=button],
2715-
[role=group] [role=button] {
2770+
[role=group] [role=button],
2771+
[role=group] label {
27162772
width: auto;
27172773
}
27182774
@supports selector(:has(*)) {
@@ -2722,8 +2778,10 @@ label > details.dropdown {
27222778
}
27232779
[role=search]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) input:not([type=checkbox], [type=radio]),
27242780
[role=search]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) select,
2781+
[role=search]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) label,
27252782
[role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) input:not([type=checkbox], [type=radio]),
2726-
[role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) select {
2783+
[role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) select,
2784+
[role=group]:has(button:focus, [type=submit]:focus, [type=button]:focus, [role=button]:focus) label {
27272785
border-color: transparent;
27282786
}
27292787
[role=search]:has(input:not([type=submit], [type=button]):focus, select:focus),
@@ -2734,10 +2792,12 @@ label > details.dropdown {
27342792
[role=search]:has(input:not([type=submit], [type=button]):focus, select:focus) [type=submit],
27352793
[role=search]:has(input:not([type=submit], [type=button]):focus, select:focus) [type=button],
27362794
[role=search]:has(input:not([type=submit], [type=button]):focus, select:focus) [role=button],
2795+
[role=search]:has(input:not([type=submit], [type=button]):focus, select:focus) label,
27372796
[role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) button,
27382797
[role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [type=submit],
27392798
[role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [type=button],
2740-
[role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [role=button] {
2799+
[role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) [role=button],
2800+
[role=group]:has(input:not([type=submit], [type=button]):focus, select:focus) label {
27412801
--pico-button-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-border);
27422802
--pico-button-hover-box-shadow: 0 0 0 var(--pico-border-width) var(--pico-primary-hover-border);
27432803
}
@@ -2746,11 +2806,13 @@ label > details.dropdown {
27462806
[role=search] [type=reset]:focus,
27472807
[role=search] [type=button]:focus,
27482808
[role=search] [role=button]:focus,
2809+
[role=search] label:focus,
27492810
[role=group] button:focus,
27502811
[role=group] [type=submit]:focus,
27512812
[role=group] [type=reset]:focus,
27522813
[role=group] [type=button]:focus,
2753-
[role=group] [role=button]:focus {
2814+
[role=group] [role=button]:focus,
2815+
[role=group] label:focus {
27542816
box-shadow: none;
27552817
}
27562818
}

css/pico.amber.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)