Skip to content

Commit e65d3f6

Browse files
committed
[css-flexbox] While the intrinsic sizing steps here guarantee that we're larger than the min-size prior to clamping by the max-size, the max-size could be less than the min-size. Therefore floor at the min-size when clamping. Fixes #361.
1 parent 4fae49a commit e65d3f6

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

css-flexbox/Overview.bs

+16-1
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,8 @@ Flex Container Intrinsic Main Sizes</h4>
27862786
to the product of its <a>flex grow factor</a>
27872787
(or <a>scaled flex shrink factor</a>, if the chosen <var>max-content flex fraction</var> was negative)
27882788
and the chosen <var>max-content flex fraction</var>,
2789-
then clamp that result by the <a>max main size property</a>.
2789+
then clamp that result by the <a>max main size property</a>
2790+
floored by the <a>min main size property</a>.
27902791

27912792
<li>
27922793
The <a>flex container</a>’s <a>max-content size</a> is the
@@ -3440,6 +3441,20 @@ Substantive Changes and Bugfixes</h4>
34403441
a value of ''align-self: auto'' is treated identically to ''align-self/start''<ins>,
34413442
and ''margin/auto'' margins are treated as zero</ins>.</p>
34423443
</blockquote>
3444+
<li>When clamping by the <a>max main size property</a>
3445+
in the <a href="#intrinsic-main-sizes">calculation of the flex container’s intrinsic size</a>,
3446+
be sure to floor by the <a>min main size property</a>.
3447+
<blockquote>
3448+
<p>Within each line,
3449+
find the largest <var>max-content flex fraction</var>
3450+
among all the <a>flex items</a>.
3451+
Add each item’s <a>flex base size</a>
3452+
to the product of its <a>flex grow factor</a>
3453+
(or <a>scaled flex shrink factor</a>, if the chosen <var>max-content flex fraction</var> was negative)
3454+
and the chosen <var>max-content flex fraction</var>,
3455+
then clamp that result by the <a>max main size property</a>
3456+
<ins>floored by the <a>min main size property</a></ins>.</p>
3457+
</blockquote>
34433458
</ul>
34443459

34453460
<h4 id="change-201605-clarify">

0 commit comments

Comments
 (0)