Skip to content

Commit 290f6d6

Browse files
committed
Clarifications to common values of flex.
1 parent ce169d5 commit 290f6d6

2 files changed

Lines changed: 60 additions & 60 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ <h2 class="no-num no-toc" id=table>Table of contents</h2>
428428
<li><a href="#flex-property"><span class=secno>7.1. </span> The ‘<code
429429
class=property>flex</code>’ Shorthand</a>
430430

431-
<li><a href="#flex-examples"><span class=secno>7.2. </span> Common
432-
Values of ‘<code class=property>flex</code></a>
431+
<li><a href="#flex-common"><span class=secno>7.2. </span> Common Values
432+
of ‘<code class=property>flex</code></a>
433433

434434
<li><a href="#flex-components"><span class=secno>7.3. </span> Components
435435
of Flexibility</a>
@@ -1256,7 +1256,8 @@ <h3 id=min-size-auto><span class=secno>4.5. </span> Implied Minimum Size of
12561256
<dt><dfn id=min-auto title="min-width/height:auto">auto</dfn>
12571257

12581258
<dd> When used as the value of a flex item's min main size property, this
1259-
keyword indicates a minimum main size of the min-content size.
1259+
keyword indicates a minimum of the min-content size, to help ensure that
1260+
the item is large enough to fit its contents.
12601261
<p class=note> It is intended that this will compute to the ‘<code
12611262
class=css>min-content</code>’ keyword when the specification defining
12621263
it (<a
@@ -1973,7 +1974,8 @@ <h3 id=flex-property><span class=secno>7.1. </span> The ‘<a
19731974
not a <a href="#flex-item"><i>flex item</i></a>, ‘<a href="#flex"><code
19741975
class=property>flex</code></a>’ has no effect.
19751976

1976-
<p> The <var>&lt;&apos;flex-basis&apos;></var> component sets the <dfn
1977+
<p> The <var>&lt;<a href="#flex-basis-property"><code
1978+
class=property>flex-basis</code></a>></var> component sets the <dfn
19771979
id=flex-basis>flex basis</dfn>, which is the initial <a
19781980
href="#main-size"><i>main size</i></a> of the <a href="#flex-item"><i>flex
19791981
item</i></a>, before free space is distributed according to the flex
@@ -1986,8 +1988,10 @@ <h3 id=flex-property><span class=secno>7.1. </span> The ‘<a
19861988
specified with a unit. Unitless zero will either be interpreted as one of
19871989
the flex ratios, or will make the declaration invalid.
19881990

1989-
<p> The <var>&lt;&apos;flex-grow&apos;></var> and
1990-
<var>&lt;&apos;flex-shrink&apos;></var> components set the <dfn
1991+
<p> The <var>&lt;<a href="#flex-grow"><code
1992+
class=property>flex-grow</code></a>></var> and <var>&lt;<a
1993+
href="#flex-basis-property"><code
1994+
class=property>flex-shrink</code></a>></var> components set the <dfn
19911995
id=flex-grow-ratio>flex grow ratio</dfn> and <dfn
19921996
id=flex-shrink-ratio>flex shrink ratio</dfn>, which determine how much the
19931997
<a href="#flex-item"><i>flex item</i></a> will grow or shrink relative to
@@ -2005,7 +2009,7 @@ <h3 id=flex-property><span class=secno>7.1. </span> The ‘<a
20052009
basis of zero) and "relative" flex (starting from a basis of the item's
20062010
content size). </figcaption> </figure>
20072011

2008-
<h3 id=flex-examples><span class=secno>7.2. </span> Common Values of ‘<a
2012+
<h3 id=flex-common><span class=secno>7.2. </span> Common Values of ‘<a
20092013
href="#flex"><code class=property>flex</code></a></h3>
20102014

20112015
<p><em>This section is informative.</em>
@@ -2018,48 +2022,44 @@ <h3 id=flex-examples><span class=secno>7.2. </span> Common Values of ‘<a
20182022

20192023
<dt><code class=css>flex: 0 auto</code>
20202024

2021-
<dd> Equivalent to ‘<code class=css>flex: 0 1 auto</code>’. The value
2022-
sets the size of the item according to the ‘<code
2025+
<dd> Equivalent to ‘<code class=css>flex: 0 1 auto</code>’. (This is
2026+
the initial value.) Sizes the item based on the ‘<code
20232027
class=property>width</code>’/‘<code class=property>height</code>
2024-
properties and makes the flex item inflexible when there is positive free
2025-
space, but allows it to shrink to its <a
2026-
href="#min-size-auto">minimum</a> when there is insufficient space. (If
2027-
the ‘<code class=property>width</code>’/‘<code
2028-
class=property>height</code>’ used as the <a href="#flex-basis"><i>flex
2029-
basis</i></a> computes to ‘<code class=css>auto</code>’, this will
2030-
size the flex item based on its contents.) The <a
2031-
href="#alignment">alignment abilities</a> or <a
2028+
properties. (If the item's <a href="#main-size-property"><i>main size
2029+
property</i></a> computes to ‘<code class=css>auto</code>’, this will
2030+
size the flex item based on its contents.) Makes the flex item inflexible
2031+
when there is positive free space, but allows it to shrink to its <a
2032+
href="#min-size-auto">minimum</a> when there is insufficient space. The
2033+
<a href="#alignment">alignment abilities</a> or <a
20322034
href="#auto-margins"><code class=css>auto</code>’ margins</a> can be
2033-
used to align flex items within the flex container.
2035+
used to align flex items along the <a href="#main-axis"><i>main
2036+
axis</i></a>.
20342037

20352038
<dt><code class=css>flex: auto</code>
20362039

2037-
<dd> Equivalent to ‘<code class=css>flex: 1 1 auto</code>’. This value
2038-
makes the flex item flexible, and sets the <a href="#flex-basis"><i>flex
2039-
basis</i></a> according to the ‘<code
2040-
class=property>width</code>’/‘<code class=property>height</code>
2041-
properties. If all items are either ‘<code class=css>flex:
2042-
auto</code>’ or ‘<code class=css>flex: none</code>’, any free space
2043-
after the items have been sized will be distributed evenly to the items
2044-
with ‘<code class=css>flex: auto</code>’.
2040+
<dd> Equivalent to ‘<code class=css>flex: 1 1 auto</code>’. Sizes the
2041+
item based on the ‘<code class=property>width</code>’/‘<code
2042+
class=property>height</code>’ properties, but makes them fully
2043+
flexible, so that they absorb any free space along the <a
2044+
href="#main-axis"><i>main axis</i></a>. If all items are either ‘<code
2045+
class=css>flex: auto</code>’, ‘<code class=css>flex:
2046+
initial</code>’, or ‘<code class=css>flex: none</code>’, any
2047+
positive free space after the items have been sized will be distributed
2048+
evenly to the items with ‘<code class=css>flex: auto</code>’.
20452049

20462050
<dt><code class=css>flex: none</code>
20472051

20482052
<dd> Equivalent to ‘<code class=css>flex: 0 0 auto</code>’. This value
2049-
makes the flex item inflexible, and sets the size of the item according
2050-
to the ‘<code class=property>width</code>’/‘<code
2051-
class=property>height</code>’ properties. To size things normally but
2052-
still use the <a href="#alignment">alignment abilities</a> of flex
2053-
layout, set all the flex items to ‘<code class=css>flex: none</code>
2054-
and then use ‘<code class=css>auto</code>’ margins or the alignment
2055-
properties. This is similar to <a href="#flex-initial"><code
2056-
class=css>initial</code></a>, except that flex items are not allowed
2057-
to shrink, even in overflow situations.
2053+
sizes the item according to the ‘<code
2054+
class=property>width</code>’/‘<code class=property>height</code>
2055+
properties, but makes the flex item fully inflexible. This is similar to
2056+
<a href="#flex-initial"><code class=css>initial</code></a>, except
2057+
that flex items are not allowed to shrink, even in overflow situations.
20582058

20592059
<dt><code class=css>flex: &lt;positive-number></code>
20602060

20612061
<dd> Equivalent to ‘<code class=css>flex: &lt;positive-number> 1
2062-
0%</code>’. This value makes the flex item flexible, and sets the <a
2062+
0px</code>’. Makes the flex item flexible and sets the <a
20632063
href="#flex-basis"><i>flex basis</i></a> to zero, resulting in an item
20642064
that receives the specified proportion of the free space in the flex
20652065
container. If all items in the flex container use this pattern, their
@@ -2069,7 +2069,8 @@ <h3 id=flex-examples><span class=secno>7.2. </span> Common Values of ‘<a
20692069
<p> By default, flex items won't shrink below their minimum content size
20702070
(the length of the longest word or fixed-size element). To change this,
20712071
set the ‘<code class=property>min-width</code>’ or ‘<code
2072-
class=property>min-height</code>’ property.
2072+
class=property>min-height</code>’ property. (See <a
2073+
href="#min-size-auto">Implied Minimum Size of Flex Items</a>.)
20732074

20742075
<h3 id=flex-components><span class=secno>7.3. </span> Components of
20752076
Flexibility</h3>

css3-flexbox/Overview.src.html

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,8 @@ <h3 id='min-size-auto'>
898898
<dt><dfn title="min-width/height:auto" id='min-auto'>auto</dfn>
899899
<dd>
900900
When used as the value of a flex item's min main size property,
901-
this keyword indicates a minimum main size of the min-content size.
901+
this keyword indicates a minimum of the min-content size,
902+
to help ensure that the item is large enough to fit its contents.
902903

903904
<p class='note'>
904905
It is intended that this will compute to the ''min-content'' keyword
@@ -1468,7 +1469,7 @@ <h3 id='flex-property'>
14681469
'flex' has no effect.
14691470

14701471
<p>
1471-
The <var>&lt;&apos;flex-basis&apos;></var> component sets the <dfn>flex basis</dfn>,
1472+
The <var>&lt;<a href="#flex-basis-property">'flex-basis'</a>></var> component sets the <dfn>flex basis</dfn>,
14721473
which is the initial <i>main size</i> of the <i>flex item</i>,
14731474
before free space is distributed according to the flex ratios.
14741475
If omitted, the <i>flex basis</i> defaults to the length zero.
@@ -1478,7 +1479,7 @@ <h3 id='flex-property'>
14781479
or will make the declaration invalid.
14791480

14801481
<p>
1481-
The <var>&lt;&apos;flex-grow&apos;></var> and <var>&lt;&apos;flex-shrink&apos;></var> components
1482+
The <var>&lt;<a href="#flex-grow">'flex-grow'</a>></var> and <var>&lt;<a href="#flex-basis-property">'flex-shrink'</a>></var> components
14821483
set the <dfn>flex grow ratio</dfn> and <dfn>flex shrink ratio</dfn>,
14831484
which determine how much the <i>flex item</i> will grow or shrink
14841485
relative to the rest of the <i>flex items</i> in the flex container
@@ -1487,7 +1488,7 @@ <h3 id='flex-property'>
14871488
<span class='note'>Note that this is different from the initial value of 'flex-grow', which is ''0''.</span>
14881489

14891490
<p id="flex-none">
1490-
The keyword 'none' computes to ''0 0 auto''.
1491+
The keyword 'none' computes to ''0 0 auto''.
14911492

14921493
<figure>
14931494
<img src='images/rel-vs-abs-flex.svg' width='504' height='240'>
@@ -1500,7 +1501,7 @@ <h3 id='flex-property'>
15001501
</figure>
15011502

15021503

1503-
<h3 id='flex-examples'>
1504+
<h3 id='flex-common'>
15041505
Common Values of 'flex'</h3>
15051506

15061507
<p><em>This section is informative.</em>
@@ -1512,40 +1513,37 @@ <h3 id='flex-examples'>
15121513
<dt id="flex-initial">''flex: initial''
15131514
<dt>''flex: 0 auto''
15141515
<dd>
1515-
Equivalent to ''flex: 0 1 auto''.
1516-
The value sets the size of the item according to the 'width'/'height' properties
1517-
and makes the flex item inflexible when there is positive free space,
1518-
but allows it to shrink to its <a href="#min-size-auto">minimum</a> when there is insufficient space.
1519-
(If the 'width'/'height' used as the <i>flex basis</i> computes to ''auto'',
1516+
Equivalent to ''flex: 0 1 auto''. (This is the initial value.)
1517+
Sizes the item based on the 'width'/'height' properties.
1518+
(If the item's <i>main size property</i> computes to ''auto'',
15201519
this will size the flex item based on its contents.)
1520+
Makes the flex item inflexible when there is positive free space,
1521+
but allows it to shrink to its <a href="#min-size-auto">minimum</a> when there is insufficient space.
15211522
The <a href="#alignment">alignment abilities</a> or <a href="#auto-margins">''auto'' margins</a>
1522-
can be used to align flex items within the flex container.
1523+
can be used to align flex items along the <i>main axis</i>.
15231524

15241525
<dt>''flex: auto''
15251526
<dd>
15261527
Equivalent to ''flex: 1 1 auto''.
1527-
This value makes the flex item flexible,
1528-
and sets the <i>flex basis</i> according to the 'width'/'height' properties.
1529-
If all items are either ''flex: auto'' or ''flex: none'',
1530-
any free space after the items have been sized will be distributed evenly to the items with ''flex: auto''.
1528+
Sizes the item based on the 'width'/'height' properties,
1529+
but makes them fully flexible, so that they absorb any free space along the <i>main axis</i>.
1530+
If all items are either ''flex: auto'', ''flex: initial'', or ''flex: none'',
1531+
any positive free space after the items have been sized will be distributed evenly to the items with ''flex: auto''.
15311532

15321533
<dt>''flex: none''
15331534
<dd>
15341535
Equivalent to ''flex: 0 0 auto''.
1535-
This value makes the flex item inflexible,
1536-
and sets the size of the item according to the 'width'/'height' properties.
1537-
To size things normally but still use the <a href="#alignment">alignment abilities</a> of flex layout,
1538-
set all the flex items to ''flex: none''
1539-
and then use ''auto'' margins or the alignment properties.
1536+
This value sizes the item according to the 'width'/'height' properties,
1537+
but makes the flex item fully inflexible.
15401538
This is similar to <a href="#flex-initial">''initial''</a>,
15411539
except that flex items are not allowed to shrink,
15421540
even in overflow situations.
15431541

15441542
<dt>''flex: &lt;positive-number>''
15451543
<dd>
1546-
Equivalent to ''flex: &lt;positive-number> 1 0%''.
1547-
This value makes the flex item flexible,
1548-
and sets the <i>flex basis</i> to zero, resulting in an item that receives the specified proportion of the free space in the flex container.
1544+
Equivalent to ''flex: &lt;positive-number> 1 0px''.
1545+
Makes the flex item flexible and sets the <i>flex basis</i> to zero,
1546+
resulting in an item that receives the specified proportion of the free space in the flex container.
15491547
If all items in the flex container use this pattern,
15501548
their sizes will be proportional to the specified flex ratio.
15511549
</dl>
@@ -1554,6 +1552,7 @@ <h3 id='flex-examples'>
15541552
By default, flex items won't shrink below their minimum content size
15551553
(the length of the longest word or fixed-size element).
15561554
To change this, set the 'min-width' or 'min-height' property.
1555+
(See <a href="#min-size-auto">Implied Minimum Size of Flex Items</a>.)
15571556

15581557
<h3 id='flex-components'>
15591558
Components of Flexibility</h3>

0 commit comments

Comments
 (0)