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] Try to fix errors in flexbox algo (missing definition of how to handle auto cross size when calculating a cross-size-dependent main size).
that’s the <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a>.
2055
2055
2056
2056
<li>
2057
-
If the <adata-link-type=dfnhref=#flex-basistitle="flex basis">flex basis</a> is <aclass=css-codedata-link-for=widthdata-link-type=valuetitle=auto>auto</a> or depends on its available size,
2058
-
and the flex container is being sized under a min-content or max-content constraint
2059
-
(e.g. when performing <ahref=http://www.w3.org/TR/CSS21/tables.html#auto-table-layout>automatic table layout</a><adata-biblio-type=normativedata-link-type=bibliohref=#css21title=css21>[CSS21]</a>),
2060
-
size the item under that constraint.
2061
-
The <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a> is the item’s resulting main size.
2062
-
2063
-
<li>
2064
-
If the flex item has ..
2057
+
If the flex item has ...
2065
2058
<ul>
2066
2059
<li>an intrinsic aspect ratio
2067
2060
<li>a <adata-link-type=dfnhref=#flex-basistitle="flex basis">flex basis</a> of <aclass=css-codedata-link-for=widthdata-link-type=valuetitle=auto>auto</a>
then the <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a> is calculated from its <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a>
2063
+
then the <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a> is calculated from its inner <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a>
2071
2064
and the <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a>’s intrinsic aspect ratio.
This substep needs review, see thread at <ahref=http://lists.w3.org/Archives/Public/www-style/2012Oct/0781.html>http://lists.w3.org/Archives/Public/www-style/2012Oct/0781.html</a>.
2075
2068
2069
+
<li>
2070
+
If the <adata-link-type=dfnhref=#flex-basistitle="flex basis">flex basis</a> is <aclass=css-codedata-link-for=widthdata-link-type=valuetitle=auto>auto</a> or depends on its available size,
2071
+
and the flex container is being sized under a min-content or max-content constraint
2072
+
(e.g. when performing <ahref=http://www.w3.org/TR/CSS21/tables.html#auto-table-layout>automatic table layout</a><adata-biblio-type=normativedata-link-type=bibliohref=#css21title=css21>[CSS21]</a>),
2073
+
size the item under that constraint.
2074
+
The <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a> is the item’s resulting main size.
2075
+
2076
2076
<li>
2077
2077
Otherwise,
2078
2078
if the <adata-link-type=dfnhref=#flex-basistitle="flex basis">flex basis</a> is <aclass=css-codedata-link-for=widthdata-link-type=valuetitle=auto>auto</a> or depends on its available size,
and treating a main size of <aclass=css-codedata-link-for=widthdata-link-type=valuetitle=auto>auto</a> as <spanclass=cssdata-link-type=maybetitle=max-content>max-content</span>.
2090
-
The <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a> is the item’s resulting main size.
2087
+
lay out the item into the <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-sizing-3/#availabletitle="available space">available space</a>
2088
+
using its <adata-link-type=dfnhref=#flex-basistitle="flex basis">flex basis</a> in place of its <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a>,
2089
+
treating a <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a> of <aclass=css-codedata-link-for=widthdata-link-type=valuetitle=auto>auto</a> as <spanclass=cssdata-link-type=maybetitle=max-content>max-content</span>.
2090
+
If a <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a> is needed to determine the <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a>
2091
+
(e.g. when the <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a>’s <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a> is in it’s block axis)
2092
+
and the <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a>’s cross size is <aclass=cssdata-link-type=maybehref=#valuedef-auto0title=auto>auto</a> and not <adata-link-type=dfnhref=#definitetitle=definite>definite</a>,
2093
+
in this calculation use <spanclass=cssdata-link-type=maybetitle=fit-content>fit-content</span> as the <adata-link-type=dfnhref=#flex-itemtitle="flex item">flex item</a>’s <adata-link-type=dfnhref=#cross-sizetitle="cross size">cross size</a>.
2094
+
The <adata-link-type=dfnhref=#flex-base-sizetitle="flex base size">flex base size</a> is the item’s resulting <adata-link-type=dfnhref=#main-sizetitle="main size">main size</a>.
Copy file name to clipboardExpand all lines: css-flexbox/Overview.src.html
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2041,25 +2041,25 @@ <h3 id='line-sizing'>
2041
2041
that's the <i>flex base size</i>.
2042
2042
2043
2043
<li>
2044
-
If the <a>flex basis</a> is <avaluefor=width>auto</a> or depends on its available size,
2045
-
and the flex container is being sized under a min-content or max-content constraint
2046
-
(e.g. when performing <ahref="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">automatic table layout</a> [[!CSS21]]),
2047
-
size the item under that constraint.
2048
-
The <i>flex base size</i> is the item's resulting main size.
2049
-
2050
-
<li>
2051
-
If the flex item has ..
2044
+
If the flex item has ...
2052
2045
<ul>
2053
2046
<li>an intrinsic aspect ratio
2054
2047
<li>a <a>flex basis</a> of <avaluefor=width>auto</a>
2055
2048
<li>a definite <i>cross size</i>
2056
2049
</ul>
2057
-
then the <i>flex base size</i> is calculated from its <i>cross size</i>
2050
+
then the <i>flex base size</i> is calculated from its inner <i>cross size</i>
2058
2051
and the <i>flex item</i>’s intrinsic aspect ratio.
2059
2052
2060
2053
<pclass='issue'>
2061
2054
This substep needs review, see thread at <ahref="http://lists.w3.org/Archives/Public/www-style/2012Oct/0781.html">http://lists.w3.org/Archives/Public/www-style/2012Oct/0781.html</a>.
2062
2055
2056
+
<li>
2057
+
If the <a>flex basis</a> is <avaluefor=width>auto</a> or depends on its available size,
2058
+
and the flex container is being sized under a min-content or max-content constraint
2059
+
(e.g. when performing <ahref="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">automatic table layout</a> [[!CSS21]]),
2060
+
size the item under that constraint.
2061
+
The <i>flex base size</i> is the item's resulting main size.
2062
+
2063
2063
<li>
2064
2064
Otherwise,
2065
2065
if the <a>flex basis</a> is <avaluefor=width>auto</a> or depends on its available size,
@@ -2071,10 +2071,14 @@ <h3 id='line-sizing'>
2071
2071
2072
2072
<li>
2073
2073
Otherwise,
2074
-
lay out the item into the available space
2075
-
using its flex basis in place of its main size,
2076
-
and treating a main size of <avaluefor=width>auto</a> as ''max-content''.
2077
-
The <i>flex base size</i> is the item's resulting main size.
2074
+
lay out the item into the <i>available space</i>
2075
+
using its <i>flex basis</i> in place of its <i>main size</i>,
2076
+
treating a <i>main size</i> of <avaluefor=width>auto</a> as ''max-content''.
2077
+
If a <i>cross size</i> is needed to determine the <i>main size</i>
2078
+
(e.g. when the <i>flex item</i>’s <i>main size</i> is in it’s block axis)
2079
+
and the <i>flex item</i>’s cross size is ''auto'' and not <i>definite</i>,
2080
+
in this calculation use ''fit-content'' as the <i>flex item</i>’s <i>cross size</i>.
2081
+
The <i>flex base size</i> is the item's resulting <i>main size</i>.
0 commit comments