Skip to content

Commit 5b24135

Browse files
committed
[css-flexbox] Account for specified size in determining max-content contributions of flex items. Fixes w3c#1435.
1 parent b875d21 commit 5b24135

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

css-flexbox/Overview.bs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,8 +2843,15 @@ Flex Container Intrinsic Cross Sizes</h4>
28432843
<h4 id='intrinsic-item-contributions'>
28442844
Flex Item Intrinsic Size Contributions</h4>
28452845

2846-
The <strong>main-size <a lt="min-content contribution">min-content</a>/<a>max-content contribution</a> of a <a>flex item</a></strong>
2847-
is its <em>outer</em> <a lt="min-content size">min-content</a>/<a>max-content size</a>,
2846+
The <strong>main-size <a>min-content contribution</a> of a <a>flex item</a></strong>
2847+
is its <em>outer</em> <a lt="min-content size">min-content</a>,
2848+
clamped by its <a>flex base size</a> as a maximum (if it is not growable)
2849+
and/or as a minimum (if it is not shrinkable),
2850+
and then further clamped by its <a lt="min main size property">min</a>/<a>max main size properties</a>.
2851+
2852+
The <strong>main-size <a>max-content contribution</a> of a <a>flex item</a></strong>
2853+
is the larger of its <em>outer</em> <a>max-content size</a>
2854+
and specified size (if that is <a>definite</a>),
28482855
clamped by its <a>flex base size</a> as a maximum (if it is not growable)
28492856
and/or as a minimum (if it is not shrinkable),
28502857
and then further clamped by its <a lt="min main size property">min</a>/<a>max main size properties</a>.
@@ -3413,6 +3420,20 @@ Changes since the 26 May 2016 CR</h3>
34133420
Substantive Changes and Bugfixes</h4>
34143421

34153422
<ul>
3423+
<li id="change-2017-max-contribution">
3424+
To prevent empty flex items in shrink-to-fit containers
3425+
from collapsing to zero even when given a specified size,
3426+
the specified size is now accounted for in calculating
3427+
its <a>max-content contribution</a> in <a href="#intrinsic-item-contributions"></a>.
3428+
(<a href="https://github.com/w3c/csswg-drafts/issues/1435">Issue 1435</a>)
3429+
<blockquote>
3430+
<p>The <strong>main-size <a>max-content contribution</a> of a <a>flex item</a></strong>
3431+
is <ins>the larger of</ins> its <em>outer</em> <a>max-content size</a>
3432+
<ins>and specified size (if that is <a>definite</a>)</ins>,
3433+
clamped by its <a>flex base size</a> as a maximum (if it is not growable)
3434+
and/or as a minimum (if it is not shrinkable),
3435+
and then further clamped by its <a lt="min main size property">min</a>/<a>max main size properties</a>.
3436+
</blockquote>
34163437
<li id="change-2016-align-self-as-specified">
34173438
For ease of implementation, ''align-self/auto'' value of 'align-self' now computes to itself always.
34183439
See <a href="change-2015-align-self-auto">related previous change</a>

0 commit comments

Comments
 (0)