Skip to content

Commit 2c446be

Browse files
committed
[css-flexbox] Fix intrinsic sizing rules that are broken per <http://www.w3.org/mid/55D6D14A.3010202@inkedblade.net>.
1 parent b12a0af commit 2c446be

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

css-flexbox/Overview.bs

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ The 'flex' Shorthand</h3>
14631463
It takes the same values as the 'width' property
14641464
(except ''flex-basis/auto'' is treated differently)
14651465
and an additional ''content'' keyword.
1466-
When omitted from the 'flex' shorthand, its specified value is ''0%''.
1466+
When omitted from the 'flex' shorthand, its specified value is ''0''.
14671467

14681468
If the specified 'flex-basis' is ''flex-basis/auto'',
14691469
the used <a>flex basis</a> is the computed value of the flex item’s <a>main size property</a>.
@@ -1538,7 +1538,7 @@ Common Values of 'flex'</h4>
15381538

15391539
<dt>''flex: &lt;positive-number>''
15401540
<dd>
1541-
Equivalent to ''flex: &lt;positive-number> 1 0%''.
1541+
Equivalent to ''flex: &lt;positive-number> 1 0''.
15421542
Makes the flex item flexible and sets the <a>flex basis</a> to zero,
15431543
resulting in an item that receives the specified proportion of the free space in the flex container.
15441544
If all items in the flex container use this pattern,
@@ -2655,9 +2655,9 @@ Intrinsic Sizes</h3>
26552655
<ol>
26562656
<li>
26572657
For each <a>flex item</a>,
2658-
subtract its <a>flex base size</a> from its <a>max-content contribution</a> size,
2659-
then divide by its <a>flex grow factor</a>, floored at 1,
2660-
or by its <a>scaled flex shrink factor</a> (if the result was negative, flooring the <a>flex shrink factor</a> at 1 if necessary).
2658+
subtract its <a>flex base size</a> from its <a>max-content contribution</a> size.
2659+
If that result is not zero, divide it by its <a>flex grow factor</a> (if the result was positive)
2660+
or by its <a>scaled flex shrink factor</a> (if the result was negative).
26612661
This is the item's <var>max-content flex fraction</var>.
26622662

26632663
<li>
@@ -2690,9 +2690,11 @@ Intrinsic Sizes</h3>
26902690
are the <a>cross size</a> of the flex container
26912691
after performing layout into the given available <a>main-axis</a> space and infinite available <a>cross-axis</a> space.
26922692

2693-
The main-size <a lt="min-content contribution">min-content</a>/<a>max-content contribution</a> of a <a>flex item</a>
2694-
is its outer <a>hypothetical main size</a>
2695-
when sized under a <a lt="min-content constraint">min-content</a>/<a>max-content constraint</a> (respectively).
2693+
The <strong>main-size <a lt="min-content contribution">min-content</a>/<a>max-content contribution</a> of a <a>flex item</a></strong>
2694+
is its outer <a lt="min-content size">min-content</a>/<a>max-content size</a>,
2695+
clamped by its <a>flex base size</a> as a maximum (if it is not growable)
2696+
and/or as a minimum (if it is not shrinkable),
2697+
and then further clamped by its <a lt="min main size property">min</a>/<a>max main size properties</a>.
26962698

26972699
See [[!CSS3-SIZING]] for a definition of the terms in this section.
26982700

@@ -3059,6 +3061,25 @@ Boris Zbarsky.
30593061
<h2 class="no-num" id="changes">Changes</h2>
30603062

30613063
This section documents the changes since previous publications.
3064+
3065+
<h3 id="changes-201505">
3066+
Changes since the 14 May 2015 LCWD</h3>
3067+
3068+
A <a href="http://dev.w3.org/csswg/css-flexbox-1/issues-lc-20150514">Disposition of Comments</a> is also available.
3069+
3070+
<h4 id="change-201505-substantive">
3071+
Substantive Changes and Bugfixes</h4>
3072+
3073+
<ul>
3074+
<li>Revert 'flex' shorthand <a href="change-2012-flex-basis-zero">change</a>
3075+
of omitted 'flex-basis' from ''0'' to ''0%'',
3076+
since that was a hacky way of solving an intrinsic size problem,
3077+
and isn't needed (and gives bad results)
3078+
given a correct implementation of [[#intrinsic-sizes]].
3079+
</ul>
3080+
3081+
<h4 id="change-201505-clarify">
3082+
Clarifications</h4>
30623083

30633084
<h3 id="changes-201409">
30643085
Changes since the 25 September 2014 LCWD</h3>

0 commit comments

Comments
 (0)