Skip to content

Commit fe62017

Browse files
committed
s/preferred size/flex basis/
--HG-- extra : rebase_source : 445e01368ab8c6eaf2727a94fe9142aa4074aeae
1 parent 6063ae3 commit fe62017

2 files changed

Lines changed: 58 additions & 54 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,9 +1251,9 @@ <h3 id=flex-order><span class=secno>6.4. </span> Display Order: the
12511251
<h2 id=flexibility><span class=secno>7. </span> Flexibility: the &lsquo;<a
12521252
href="#flex"><code class=property>flex</code></a>&rsquo; property</h2>
12531253

1254-
<p>The defining aspect of flexbox layout is the ability to make the <a
1254+
<p> The defining aspect of flexbox layout is the ability to make the <a
12551255
href="#flexbox-item"><i>flexbox items</i></a> "flex", altering their width
1256-
or height to fill the available space. This is done by using a &lsquo;<a
1256+
or height to fill the available space. This is done with the &lsquo;<a
12571257
href="#flex"><code class=property>flex</code></a>&rsquo; property. A
12581258
flexbox distributes free space to its items proportional to their positive
12591259
flexibility, or shrinks them to prevent overflow proportional to their
@@ -1289,8 +1289,8 @@ <h2 id=flexibility><span class=secno>7. </span> Flexibility: the &lsquo;<a
12891289
<tr>
12901290
<th>Computed Value:
12911291

1292-
<td>Two integers for positive and negative flex, and a preferred size
1293-
given either as an absolute length or a keyword.
1292+
<td>Two numbers for positive and negative flex, and a flex basis given
1293+
either as an absolute length or a keyword.
12941294

12951295
<tr>
12961296
<th>Media:
@@ -1315,8 +1315,8 @@ <h2 id=flexibility><span class=secno>7. </span> Flexibility: the &lsquo;<a
13151315
length</dfn>: the <dfn id=positive-flexibility
13161316
title="positive flexibility">positive</dfn> and <dfn
13171317
id=negative-flexibility>negative flexibility</dfn>, and the <dfn
1318-
id=preferred-size>preferred size</dfn>. When the element containing
1319-
&lsquo;<a href="#flex"><code class=property>flex</code></a>&rsquo; is a <a
1318+
id=flex-basis>flex basis</dfn>. When the element containing &lsquo;<a
1319+
href="#flex"><code class=property>flex</code></a>&rsquo; is a <a
13201320
href="#flexbox-item"><i>flexbox item</i></a>, &lsquo;<a href="#flex"><code
13211321
class=property>flex</code></a>&rsquo; is consulted <em>instead of</em> the
13221322
<a href="#main-size-property"><i>main size property</i></a> to determine
@@ -1335,13 +1335,13 @@ <h2 id=flexibility><span class=secno>7. </span> Flexibility: the &lsquo;<a
13351335
href="#positive-flexibility"><i>positive flexibility</i></a> defaults to
13361336
&lsquo;<code class=css>1</code>&rsquo;.
13371337

1338-
<p> The <var>&lt;&apos;width&apos;></var> component sets the preferred
1339-
size. If omitted, the preferred size defaults to &lsquo;<code
1338+
<p> The <var>&lt;&apos;width&apos;></var> component sets the flex basis. If
1339+
omitted, the flex basis defaults to &lsquo;<code
13401340
class=css>0px</code>&rsquo;. If the <var>&lt;&apos;width&apos;></var>
13411341
component is &lsquo;<code class=css>auto</code>&rsquo; on a child of a <a
13421342
href="#display-flexbox"><i>flexbox</i></a>, the <a
1343-
href="#preferred-size"><i>preferred size</i></a> is the computed value of
1344-
the <a href="#main-size-property"><i>main size property</i></a>.
1343+
href="#flex-basis"><i>flex basis</i></a> is the computed value of the <a
1344+
href="#main-size-property"><i>main size property</i></a>.
13451345

13461346
<p> If the <var>&lt;&apos;width&apos;></var> is zero, it
13471347
<strong>must</strong> be specified with a unit (like &lsquo;<code
@@ -1356,7 +1356,7 @@ <h2 id=flexibility><span class=secno>7. </span> Flexibility: the &lsquo;<a
13561356
property is animatable by animating the <a
13571357
href="#positive-flexibility"><i>positive flexibility</i></a>, <a
13581358
href="#negative-flexibility"><i>negative flexibility</i></a>, and <a
1359-
href="#preferred-size"><i>preferred size</i></a> independently.
1359+
href="#flex-basis"><i>flex basis</i></a> independently.
13601360

13611361
<p class=issue> Can you animate between zero and non-zero flex? It has bad
13621362
effects right now, and should possibly be disallowed until we know how to
@@ -1380,13 +1380,12 @@ <h2 id=flexibility><span class=secno>7. </span> Flexibility: the &lsquo;<a
13801380
&lt;/div&gt;
13811381
</pre>
13821382

1383-
<p> Here, all four paragraphs have a <a
1384-
href="#preferred-size"><i>preferred size</i></a> equal to the length of
1385-
their text. The leftover space (after subtracting their preferred sizes
1386-
and margins from the width of the flexbox) is distributed evenly to the
1387-
four paragraphs. This shows how elements with the same flexibility may
1388-
still end up different sizes, if their preferred sizes are different.
1389-
<img alt="" src="images/wp7zxxyu.gif">
1383+
<p> Here, all four paragraphs have a <a href="#flex-basis"><i>flex
1384+
basis</i></a> equal to the length of their text. The leftover space
1385+
(after subtracting their flex basises and margins from the width of the
1386+
flexbox) is distributed evenly to the four paragraphs. This shows how
1387+
elements with the same flexibility may still end up different sizes, if
1388+
their flex basises are different. <img alt="" src="images/wp7zxxyu.gif">
13901389
</div>
13911390

13921391
<h2 id=alignment><span class=secno>8. </span> Alignment</h2>
@@ -1412,7 +1411,7 @@ <h3 id=auto-margins><span class=secno>8.1. </span> Aligning with
14121411
in normal flow:
14131412

14141413
<ul>
1415-
<li> During calculations of preferred sizes and flexible lengths, auto
1414+
<li> During calculations of flex basises and flexible lengths, auto
14161415
margins are treated as &lsquo;<code class=css>0</code>&rsquo;.
14171416

14181417
<li> Prior to alignment via &lsquo;<a href="#flex-pack0"><code
@@ -2050,19 +2049,19 @@ <h2 id=layout-algorithm><span class=secno>9. </span> Flexbox Layout
20502049

20512050
<li> <strong>Determine the hypothetical main size of each item:</strong>
20522051
<ul>
2053-
<li> If the item has a <a href="#definite"><i>definite</i></a> preferred
2054-
size, that's the hypothetical size.
2052+
<li> If the item has a <a href="#definite"><i>definite</i></a> flex
2053+
basis, that's the hypothetical size.
20552054

20562055
<li> Otherwise, if the flexbox's main-axis is parallel to the item's
2057-
inline-axis, lay out the item using its preferred size and the
2058-
available space, treating &lsquo;<code class=css>auto</code>&rsquo; as
2056+
inline-axis, lay out the item using its flex basis and the available
2057+
space, treating &lsquo;<code class=css>auto</code>&rsquo; as
20592058
&lsquo;<code class=css>fit-content</code>&rsquo; unless the item's
20602059
writing mode is perpendicular to the flexbox's writing mode (in which
20612060
case <a
20622061
href="http://www.w3.org/TR/css3-writing-modes/#orthogonal-flows">the
20632062
rules for a box in an orthogonal flow</a> <a href="#CSS3-WRITING-MODES"
20642063
rel=biblioentry>[CSS3-WRITING-MODES]<!--{{!CSS3-WRITING-MODES}}--></a>
2065-
are in effect). If the preferred size is &lsquo;<code
2064+
are in effect). If the flex basis is &lsquo;<code
20662065
class=css>fill-available</code>&rsquo;, or &lsquo;<code
20672066
class=css>fit-content</code>&rsquo;, and the flexbox is being sized
20682067
under a min-content or max-content main-size constraint, size the item
@@ -2076,7 +2075,7 @@ <h2 id=layout-algorithm><span class=secno>9. </span> Flexbox Layout
20762075
href="http://www.w3.org/TR/css3-writing-modes/#orthogonal-flows">the
20772076
rules for a box in an orthogonal flow</a> <a href="#CSS3-WRITING-MODES"
20782077
rel=biblioentry>[CSS3-WRITING-MODES]<!--{{!CSS3-WRITING-MODES}}--></a>
2079-
are in effect). If the preferred size is &lsquo;<code
2078+
are in effect). If the flex basis is &lsquo;<code
20802079
class=css>auto</code>&rsquo;, &lsquo;<code
20812080
class=css>fill-available</code>&rsquo;, or &lsquo;<code
20822081
class=css>fit-content</code>&rsquo;, and the flexbox is being sized
@@ -2085,9 +2084,9 @@ <h2 id=layout-algorithm><span class=secno>9. </span> Flexbox Layout
20852084
resulting max-content extent.
20862085
</ul>
20872086

2088-
<p> <em>Do not apply min/max-width/height constraints to the preferred
2089-
size of flexible lengths &mdash; those constraints are handled elsewhere
2090-
in this algorithm, and doing so will produce incorrect results.</em>
2087+
<p> <em>Do not apply min/max-width/height constraints to the flex basis
2088+
of flexible lengths &mdash; those constraints are handled elsewhere in
2089+
this algorithm, and doing so will produce incorrect results.</em>
20912090

20922091
<li> <strong>Determine the main size of the flexbox</strong> using its <a
20932092
href="#main-size-property"><i>main size property</i></a>. In this
@@ -2097,7 +2096,7 @@ <h2 id=layout-algorithm><span class=secno>9. </span> Flexbox Layout
20972096
flexbox's items' <i>max-content size contributions</i>. For these
20982097
computations, &lsquo;<code class=css>auto</code>&rsquo; margins are
20992098
treated as &lsquo;<code class=css>0</code>&rsquo;, and for flexbox items
2100-
the preferred size is used in place of the <a
2099+
the flex basis is used in place of the <a
21012100
href="#main-size-property"><i>main size property</i></a>.
21022101

21032102
<li> <strong>Collect flexbox items into flexbox lines:</strong>
@@ -2319,8 +2318,8 @@ <h2 id=pagination><span class=secno>10. </span> Page breaks in flexbox</h2>
23192318
<li>
23202319
<p>If flexbox main-axis size is definite, flexbox algorithm must be run
23212320
first, without constraints of available space on page and using all
2322-
content of the flexbox. Otherwise flexbox items use the preferred
2323-
size, adjusted for min/max.
2321+
content of the flexbox. Otherwise flexbox items use the flex basis,
2322+
adjusted for min/max.
23242323

23252324
<p>If page size varies and flexbox size depends on page size, this step
23262325
has to be repeated on each page, again with the whole content of the
@@ -2754,8 +2753,8 @@ <h2 class=no-num id=property>Property index</h2>
27542753

27552754
<td>no
27562755

2757-
<td>Two integers for positive and negative flex, and a preferred size
2758-
given either as an absolute length or a keyword.
2756+
<td>Two numbers for positive and negative flex, and a flex basis given
2757+
either as an absolute length or a keyword.
27592758

27602759
<td>visual
27612760

@@ -2947,6 +2946,9 @@ <h2 class=no-num id=index>Index</h2>
29472946
<li>flex-align, <a href="#flex-align0"
29482947
title=flex-align><strong>8.3.</strong></a>
29492948

2949+
<li>flex basis, <a href="#flex-basis"
2950+
title="flex basis"><strong>7.</strong></a>
2951+
29502952
<li>flexbox, <a href="#display-flexbox"
29512953
title=flexbox><strong>3.</strong></a>, <a href="#flexbox"
29522954
title=flexbox><strong>2.</strong></a>
@@ -3034,9 +3036,6 @@ <h2 class=no-num id=index>Index</h2>
30343036
<li>positive flexibility, <a href="#positive-flexibility"
30353037
title="positive flexibility"><strong>7.</strong></a>
30363038

3037-
<li>preferred size, <a href="#preferred-size"
3038-
title="preferred size"><strong>7.</strong></a>
3039-
30403039
<li>renderer, <a href="#renderer"
30413040
title=renderer><strong>12.2.</strong></a>
30423041

css3-flexbox/Overview.src.html

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,12 @@ <h3 id='flex-order'>
787787
<h2 id='flexibility'>
788788
Flexibility: the 'flex' property</h2>
789789

790-
<p>The defining aspect of flexbox layout is the ability to make the <i>flexbox items</i> "flex", altering their width or height to fill the available space. This is done by using a 'flex' property. A flexbox distributes free space to its items proportional to their positive flexibility, or shrinks them to prevent overflow proportional to their negative flexibility.
790+
<p>
791+
The defining aspect of flexbox layout is the ability to make the <i>flexbox items</i> "flex",
792+
altering their width or height to fill the available space.
793+
This is done with the 'flex' property.
794+
A flexbox distributes free space to its items proportional to their positive flexibility,
795+
or shrinks them to prevent overflow proportional to their negative flexibility.
791796

792797
<table class=propdef>
793798
<tr>
@@ -807,7 +812,7 @@ <h2 id='flexibility'>
807812
<td>no
808813
<tr>
809814
<th>Computed Value:
810-
<td>Two integers for positive and negative flex, and a preferred size given either as an absolute length or a keyword.
815+
<td>Two numbers for positive and negative flex, and a flex basis given either as an absolute length or a keyword.
811816
<tr>
812817
<th>Media:
813818
<td>visual
@@ -823,7 +828,7 @@ <h2 id='flexibility'>
823828
The 'flex' property specifies the parameters of a <dfn title="flexible length|flexible lengths|flexible length's">flexible length</dfn>:
824829
the <dfn id="positive-flexibility" title="positive flexibility">positive</dfn>
825830
and <dfn>negative flexibility</dfn>,
826-
and the <dfn>preferred size</dfn>.
831+
and the <dfn>flex basis</dfn>.
827832
When the element containing 'flex' is a <i>flexbox item</i>,
828833
'flex' is consulted <em>instead of</em> the <i>main size property</i>
829834
to determine the <i>main size</i> of the element.
@@ -839,10 +844,10 @@ <h2 id='flexibility'>
839844
the <i>positive flexibility</i> defaults to ''1''.
840845

841846
<p>
842-
The <var>&lt;&apos;width&apos;></var> component sets the preferred size.
843-
If omitted, the preferred size defaults to ''0px''.
847+
The <var>&lt;&apos;width&apos;></var> component sets the flex basis.
848+
If omitted, the flex basis defaults to ''0px''.
844849
If the <var>&lt;&apos;width&apos;></var> component is ''auto'' on a child of a <i>flexbox</i>,
845-
the <i>preferred size</i> is the computed value of the <i>main size property</i>.
850+
the <i>flex basis</i> is the computed value of the <i>main size property</i>.
846851

847852
<p>
848853
If the <var>&lt;&apos;width&apos;></var> is zero,
@@ -858,7 +863,7 @@ <h2 id='flexibility'>
858863

859864
<p>
860865
The 'flex' property is animatable
861-
by animating the <i>positive flexibility</i>, <i>negative flexibility</i>, and <i>preferred size</i> independently.
866+
by animating the <i>positive flexibility</i>, <i>negative flexibility</i>, and <i>flex basis</i> independently.
862867

863868
<p class='issue'>
864869
Can you animate between zero and non-zero flex?
@@ -885,12 +890,12 @@ <h2 id='flexibility'>
885890
</pre>
886891

887892
<p>
888-
Here, all four paragraphs have a <i>preferred size</i> equal to the length of their text.
893+
Here, all four paragraphs have a <i>flex basis</i> equal to the length of their text.
889894
The leftover space
890-
(after subtracting their preferred sizes and margins from the width of the flexbox)
895+
(after subtracting their flex basises and margins from the width of the flexbox)
891896
is distributed evenly to the four paragraphs.
892897
This shows how elements with the same flexibility may still end up different sizes,
893-
if their preferred sizes are different.
898+
if their flex basises are different.
894899

895900
<img src="images/wp7zxxyu.gif" alt="">
896901

@@ -920,7 +925,7 @@ <h3 id='auto-margins'>
920925

921926
<ul>
922927
<li>
923-
During calculations of preferred sizes and flexible lengths, auto margins are treated as ''0''.
928+
During calculations of flex basises and flexible lengths, auto margins are treated as ''0''.
924929

925930
<li>
926931
Prior to alignment via 'flex-pack' and 'flex-item-align',
@@ -1369,18 +1374,18 @@ <h2 id='layout-algorithm'>
13691374

13701375
<ul>
13711376
<li>
1372-
If the item has a <i>definite</i> preferred size,
1377+
If the item has a <i>definite</i> flex basis,
13731378
that's the hypothetical size.
13741379

13751380
<li>
13761381
Otherwise,
13771382
if the flexbox's main-axis is parallel to the item's inline-axis,
1378-
lay out the item using its preferred size
1383+
lay out the item using its flex basis
13791384
and the available space,
13801385
treating ''auto'' as ''fit-content''
13811386
unless the item's writing mode is perpendicular to the flexbox's writing mode
13821387
(in which case <a href="http://www.w3.org/TR/css3-writing-modes/#orthogonal-flows">the rules for a box in an orthogonal flow</a> [[!CSS3-WRITING-MODES]] are in effect).
1383-
If the preferred size is ''fill-available'', or ''fit-content'',
1388+
If the flex basis is ''fill-available'', or ''fit-content'',
13841389
and the flexbox is being sized under a min-content or max-content main-size constraint,
13851390
size the item under that constraint instead.
13861391
The hypothetical size is the item's resulting measure.
@@ -1392,14 +1397,14 @@ <h2 id='layout-algorithm'>
13921397
treating ''auto'' as ''fit-content''
13931398
unless the item's writing mode is perpendicular to the flexbox's writing mode
13941399
(in which case <a href="http://www.w3.org/TR/css3-writing-modes/#orthogonal-flows">the rules for a box in an orthogonal flow</a> [[!CSS3-WRITING-MODES]] are in effect).
1395-
If the preferred size is ''auto'', ''fill-available'', or ''fit-content'',
1400+
If the flex basis is ''auto'', ''fill-available'', or ''fit-content'',
13961401
and the flexbox is being sized under a min-content or max-content cross-size constraint,
13971402
size the item under that constraint instead.
13981403
The hypothetical size is the item's resulting max-content extent.
13991404
</ul>
14001405

14011406
<p>
1402-
<em>Do not apply min/max-width/height constraints to the preferred size of flexible lengths &mdash;
1407+
<em>Do not apply min/max-width/height constraints to the flex basis of flexible lengths &mdash;
14031408
those constraints are handled elsewhere in this algorithm, and doing so will produce incorrect results.</em>
14041409

14051410
<li>
@@ -1409,7 +1414,7 @@ <h2 id='layout-algorithm'>
14091414
and the <i>max content main size</i> of the flexbox
14101415
is the sum of the flexbox's items' <i>max-content size contributions</i>.
14111416
For these computations, ''auto'' margins are treated as ''0'',
1412-
and for flexbox items the preferred size is used in place of the <i>main size property</i>.
1417+
and for flexbox items the flex basis is used in place of the <i>main size property</i>.
14131418

14141419
<li>
14151420
<strong>Collect flexbox items into flexbox lines:</strong>
@@ -1645,7 +1650,7 @@ <h2 id="pagination">
16451650
<ol>
16461651
<li>
16471652
<p>If flexbox main-axis size is definite, flexbox algorithm must be run first, without constraints of available space on page and using all content of the flexbox. Otherwise
1648-
flexbox items use the preferred size, adjusted for min/max.
1653+
flexbox items use the flex basis, adjusted for min/max.
16491654

16501655
<p>If page size varies and flexbox size depends on page size, this step has to be repeated on each page, again with the whole content of the flexbox.
16511656

0 commit comments

Comments
 (0)