Skip to content

Commit 05fc4f7

Browse files
committed
flex-item-align:stretch can only change item with 'auto' preferred size and it can only stretch them, not shrink
1 parent e7d0459 commit 05fc4f7

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

css3-flexbox/Overview.src.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,12 +1049,19 @@ <h2 id='layout-algorithm'>
10491049

10501050
<li>If the flexbox doesn't have a definite cross size, the cross size of its content box is the sum of the cross sizes of all of its lines.</li>
10511051

1052-
<li>Determine the final cross size of each flexbox item. For each flexbox item, if it has ''flex-item-align:stretch'', its final cross size is
1053-
set so that its margin-box cross size is equal to cross-size of its flexbox line. For all other flexbox items, its final cross size is its hypothetical cross size.
1054-
If the result conflicts with &#39;min-width&#39;, &#39;max-width&#39;, &#39;min-height&#39; or
1055-
&#39;max-height&#39;, correct the result to comply the restrictions.</li>
1056-
<p class="issue">'auto' height must only grow, not shrink here</p>
1057-
1052+
<li>
1053+
<p>Determine the final cross size of each flexbox item.
1054+
<ol>
1055+
<li>If a flexbox item has ''flex-item-align:stretch&#39;&#39; and its
1056+
preferred cross size is &#39;auto and its margin-box cross size is
1057+
smaller than cross-size of its flexbox line, its final cross size is
1058+
set so that its margin-box cross size is equal to cross-size of its flexbox line.
1059+
<li>For all other flexbox items, its final cross size is its hypothetical cross size.
1060+
</li>
1061+
<li>If the resulting cross size of any item conflits with &#39;min-width&#39;, &#39;max-width&#39;, &#39;min-height&#39; or
1062+
&#39;max-height&#39;, correct the result to comply with the restrictions.</li>
1063+
</ol>
1064+
</li>
10581065
<li>Resolve &#39;auto&#39; margins on cross axis. For each flexbox item, if its
10591066
margin box cross size is smaller than cross size of its line and it has
10601067
any margins in cross direction set to &#39;auto&#39;, distribute the difference

0 commit comments

Comments
 (0)