You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-flexbox] Fix special cases of multi-line flex containers iwht a single line to fall under the multi-line behavior, not the single-line flex container behavior.
flexible lengths and the <aclass=propertydata-link-type=propdeschref=#propdef-justify-contenttitle=justify-content>justify-content</a> and <aclass=propertydata-link-type=propdeschref=#propdef-align-selftitle=align-self>align-self</a> properties only consider the items on a single line at a time.
1423
1423
1424
1424
<p>
1425
-
When a flex container has multiple lines, the <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a> of each line
1425
+
In a <adata-link-type=dfnhref=#multi-linetitle=multi-line>multi-line</a><adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a> (even one with only a single line),
1426
+
the <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a> of each line
1426
1427
is the minimum size necessary to contain the <adata-link-type=dfnhref=#flex-itemtitle="flex items">flex items</a> on the line
1427
1428
(after aligment due to <aclass=propertydata-link-type=propdeschref=#propdef-align-selftitle=align-self>align-self</a>),
1428
1429
and the lines are aligned within the flex container with the <aclass=propertydata-link-type=propdeschref=#propdef-align-contenttitle=align-content>align-content</a> property.
1429
-
When a flex container (even a <adata-link-type=dfnhref=#multi-linetitle=multi-line>multi-line</a>one) has only one line,
1430
+
In a <adata-link-type=dfnhref=#single-linetitle=single-line>single-line</a><adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>,
1430
1431
the <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a> of the line is the <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a> of the flex container,
1431
1432
and <aclass=propertydata-link-type=propdeschref=#propdef-align-contenttitle=align-content>align-content</a> has no effect.
1432
1433
The <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a> of a line is always the same as the <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a> of the flex container’s content box.
@@ -1971,7 +1972,7 @@ <h3 class="heading settled" data-level=8.4 id=align-content-property><span class
1971
1972
The <aclass=propertydata-link-type=propdeschref=#propdef-align-contenttitle=align-content>align-content</a> property aligns a flex container’s lines within the flex container
1972
1973
when there is extra space in the <adata-link-type=dfnhref=#cross-axistitle=cross-axis>cross-axis</a>,
1973
1974
similar to how <aclass=propertydata-link-type=propdeschref=#propdef-justify-contenttitle=justify-content>justify-content</a> aligns individual items within the <adata-link-type=dfnhref=#main-axistitle=main-axis>main-axis</a>.
1974
-
Note, this property has no effect when the flex container has only a single line.
1975
+
Note, this property has no effect on a <adata-link-type=dfnhref=#single-linetitle=single-line>single-line</a><adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>.
1975
1976
Values have the following meanings:
1976
1977
1977
1978
<dldata-dfn-for=align-contentdata-dfn-type=value>
@@ -2037,9 +2038,9 @@ <h3 class="heading settled" data-level=8.4 id=align-content-property><span class
2037
2038
</dl>
2038
2039
2039
2040
<pclass=note>
2040
-
Note: Only flex containers with multiple lines
2041
+
Note: Only <adata-link-type=dfnhref=#multi-linetitle=multi-line>multi-line</a><adata-link-type=dfnhref=#flex-containertitle="flex containers">flex containers</a>
2041
2042
ever have free space in the <adata-link-type=dfnhref=#cross-axistitle=cross-axis>cross-axis</a> for lines to be aligned in,
2042
-
because in a flex container with a single line
2043
+
because in a <adata-link-type=dfnhref=#single-linetitle=single-line>single-line</a> flex container
2043
2044
the sole line automatically stretches to fill the space.
<strong>Calculate the cross size of each flex line.</strong>
2285
2286
2286
2287
<p>
2287
-
If the flex container has only one <adata-link-type=dfnhref=#flex-linetitle="flex line">flex line</a>
2288
-
(even if it’s a <adata-link-type=dfnhref=#multi-linetitle=multi-line>multi-line</a><adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>)
2288
+
If the flex container is <adata-link-type=dfnhref=#single-linetitle=single-line>single-line</a>
2289
2289
and has a <adata-link-type=dfnhref=#definitetitle=definite>definite</a><adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a>,
2290
2290
the <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a> of the <adata-link-type=dfnhref=#flex-linetitle="flex line">flex line</a>
2291
2291
is the <adata-link-type=dfnhref=#flex-containertitle="flex container">flex container</a>’s inner <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a>.
The used cross-size of the <adata-link-type=dfnhref=#flex-linetitle="flex line">flex line</a> is the largest of the numbers found in the previous two steps and zero.
2312
2312
2313
-
<p>If the flex container has only one flex line
2314
-
(even if it’s a multi-line flex container),
2313
+
<p>If the flex container is <adata-link-type=dfnhref=#single-linetitle=single-line>single-line</a>,
2315
2314
then clamp the line’s cross-size to be within the container’s computed min and max cross-size properties.
2316
2315
<spanclass=note>Note that if CSS 2.1’s definition of min/max-width/height applied more generally,
2317
2316
this behavior would fall out automatically.</span></p>
0 commit comments