Skip to content

Commit 7b5e22e

Browse files
committed
[css-flexbox] Clarify how flex-basis and 'flex basis' interact, and how it becomes 'content'.
1 parent dfde9cf commit 7b5e22e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

css-flexbox/Overview.bs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,11 +1535,12 @@ The 'flex' Shorthand</h3>
15351535

15361536
<dt><dfn><<'flex-basis'>></dfn>
15371537
<dd>
1538-
This component sets the 'flex-basis' <a href="#flex-components">longhand</a>
1539-
and specifies the <dfn dfn>flex basis</dfn>:
1538+
This component sets the 'flex-basis' <a href="#flex-components">longhand</a>,
1539+
which specifies the <dfn dfn>flex basis</dfn>:
15401540
the initial <a>main size</a> of the <a>flex item</a>,
15411541
before free space is distributed according to the flex factors.
1542-
It accepts the same values as the 'width' and 'height' properties
1542+
1543+
<<'flex-basis'>> accepts the same values as the 'width' and 'height' properties
15431544
(except that ''flex-basis/auto'' is treated differently)
15441545
plus the ''content'' keyword:
15451546

@@ -1726,14 +1727,14 @@ The 'flex-basis' property</h4>
17261727
The 'flex-basis' property sets the <a>flex basis</a>.
17271728
It accepts the same values as the 'width' and 'height' property, plus ''content''.
17281729

1729-
17301730
For all values other than ''flex-basis/auto'' and ''content'' (defined above),
1731-
'flex-basis' is resolved the same way as 'width' in horizontal writing modes [[!CSS21]].
1731+
'flex-basis' is resolved the same way as 'width' in horizontal writing modes [[!CSS21]],
1732+
except that if a value would resolve to ''width/auto'' for 'width',
1733+
it instead resolves to ''content'' for 'flex-basis'.
17321734
For example, percentage values of 'flex-basis' are resolved against
1733-
the flex item's containing block (i.e. its flex container)
1735+
the flex item's containing block (i.e. its <a>flex container</a>);
17341736
and if that containing block's size is <a>indefinite</a>,
1735-
the result is the same as a <a>main size</a> of <a value for=width>auto</a>
1736-
(which in this case is treated as ''content'').
1737+
'flex-basis' becomes ''content''.
17371738
As another corollary,
17381739
'flex-basis' determines the size of the content box,
17391740
unless otherwise specified

0 commit comments

Comments
 (0)