Skip to content

Commit b7f212e

Browse files
committed
Changed the "Flexibility" opening to not imply that paddings and margins can take <flex> values.
Changed the flex() function to accept unitless 0 as the third value.
1 parent 9fe272d commit b7f212e

2 files changed

Lines changed: 62 additions & 58 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
<h1 id=head-box-flexible>Flexible Box Layout Module</h1>
2323

24-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 16 April 2011</h2>
24+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 19 April 2011</h2>
2525

2626
<dl>
2727
<dt>This version:
2828

29-
<dd><!-- <a href="http://www.w3.org/TR/2011/WD-css3-flexbox-20110416/">http://www.w3.org/TR/2011/WD-css3-flexbox-20110416/</a></dd> -->
29+
<dd><!-- <a href="http://www.w3.org/TR/2011/WD-css3-flexbox-20110419/">http://www.w3.org/TR/2011/WD-css3-flexbox-20110419/</a></dd> -->
3030
<a
3131
href="http://dev.w3.org/csswg/css3-flexbox/">http://dev.w3.org/csswg/css3-flexbox/</a>
3232

@@ -579,16 +579,16 @@ <h2 id=flexibility><span class=secno>5. </span> Flexibility</h2>
579579

580580
<p>The defining aspect of flexbox layout is the ability to make various
581581
lengths of the <a href="#flexbox-item"><i>flexbox item</i></a>s flexible.
582-
Flexible lengths can be used for the &lsquo;<code
583-
class=property>width</code>&rsquo;, &lsquo;<code
582+
The &lsquo;<code class=property>width</code>&rsquo;, &lsquo;<code
584583
class=property>height</code>&rsquo;, &lsquo;<code
585584
class=property>padding</code>&rsquo;, and &lsquo;<code
586-
class=property>margin</code>&rsquo; properties of <a
587-
href="#flexbox-item"><i>flexbox item</i></a>s. A <dfn
588-
id=flexible-length>flexible length</dfn> can grow if the flexbox has extra
589-
space available, or shrink if the flexbox would otherwise overflow. The
590-
&lsquo;<code class=css>flex()</code>&rsquo; function is used to specify a
591-
<a href="#flexible-length"><i>flexible length</i></a> and it's parameters.
585+
class=property>margin</code>&rsquo; properties of a <a
586+
href="#flexbox-item"><i>flexbox item</i></a> can all be made flexible.
587+
Paddings and margins are made flexible by setting their value to
588+
&lsquo;<code class=css>auto</code>&rsquo;, while the width and height of a
589+
box can be controlled more precisely with the &lsquo;<code
590+
class=css>fr</code>&rsquo; unit or the &lsquo;<code
591+
class=css>flex()</code>&rsquo; function, both defined below.
592592

593593
<div class=example>
594594
<p class=issue>TODO: Examples!</p>
@@ -597,13 +597,12 @@ <h2 id=flexibility><span class=secno>5. </span> Flexibility</h2>
597597
<h3 id=resolving-flexible-lengths><span class=secno>5.1. </span> Resolving
598598
Flexible Lengths</h3>
599599

600-
<p>CSS resolves a <a href="#flexible-length"><i>flexible length</i></a>
601-
into a definite length by first collecting all the lengths, flexible or
602-
inflexible, that will share some space. For example, for a horizontal
603-
flexbox, the lengths of the left and right margins, left and right
604-
borders, left and right paddings, and widths of all <a
605-
href="#flexbox-item"><i>flexbox item</i></a>s share the width of the
606-
flexbox itself. Conversely, each <a href="#flexbox-item"><i>flexbox
600+
<p>CSS resolves a <i>flexible length</i> into a definite length by first
601+
collecting all the lengths, flexible or inflexible, that will share some
602+
space. For example, for a horizontal flexbox, the lengths of the left and
603+
right margins, left and right borders, left and right paddings, and widths
604+
of all <a href="#flexbox-item"><i>flexbox item</i></a>s share the width of
605+
the flexbox itself. Conversely, each <a href="#flexbox-item"><i>flexbox
607606
item</i></a>&lsquo;<code class=property>s</code>&rsquo; vertical margins,
608607
borders, padding, and height individually share the height of the flexbox.
609608

@@ -619,15 +618,13 @@ <h3 id=resolving-flexible-lengths><span class=secno>5.1. </span> Resolving
619618
<i>preferred size</i>. If the sum of all the <a href="#preflex-size"><i
620619
title="preflex size">preflex sizes</i></a> is less than the available
621620
width/height of the flexbox, then the difference is split up among all the
622-
<a href="#flexible-length"><i title="flexible length">flexible
623-
lengths</i></a> with <dfn id=positive-flexibility>positive
624-
flexibility</dfn>, with the space divvied up proportionally to the
625-
flexibility of each length. If the sum is greater than the available
626-
width/height, then all the <a href="#flexible-length"><i title="flexible
627-
length">flexible lengths</i></a> with <dfn
628-
id=negative-flexibility>negative flexibility</dfn> shrink in proportion to
629-
their flexibility to try and make the sum equal the available
630-
width/height.
621+
<i title="flexible length">flexible lengths</i> with <dfn
622+
id=positive-flexibility>positive flexibility</dfn>, with the space divvied
623+
up proportionally to the flexibility of each length. If the sum is greater
624+
than the available width/height, then all the <i title="flexible
625+
length">flexible lengths</i> with <dfn id=negative-flexibility>negative
626+
flexibility</dfn> shrink in proportion to their flexibility to try and
627+
make the sum equal the available width/height.
631628

632629
<p>The &lsquo;<a href="#flex-pack0"><code
633630
class=property>flex-pack</code></a>&rsquo; and &lsquo;<a
@@ -653,8 +650,8 @@ <h3 id=flex-function><span class=secno>5.3. </span> The &lsquo;<code
653650
class=css>flex()</code>&rsquo; function</h3>
654651

655652
<p>The &lsquo;<code class=css>flex()</code>&rsquo; function is used to
656-
specify the parameters of a <a href="#flexible-length"><i>flexible
657-
length</i></a>: the <a href="#positive-flexibility"><i title="positive
653+
specify the parameters of a <i>flexible length</i>: the <a
654+
href="#positive-flexibility"><i title="positive
658655
flexibility">positive</i></a> and <a
659656
href="#negative-flexibility"><i>negative flexibility</i></a>, and the
660657
<i>preferred size</i>. The syntax of the &lsquo;<code
@@ -721,10 +718,17 @@ <h3 id=flex-function><span class=secno>5.3. </span> The &lsquo;<code
721718

722719
<dd>
723720
<ul>
724-
<li>If two of the values are non-negative numbers, and the other is a
725-
&lt;length> (with a unit suffix), a &lt;percentage>, or a valid keyword
726-
for &lsquo;<code class=property>width</code>&rsquo; or &lsquo;<code
727-
class=property>height</code>&rsquo;, the <a
721+
<li>If the first two values are non-negative numbers and the third value
722+
is &lsquo;<code class=css>0</code>&rsquo;, the <a
723+
href="#positive-flexibility"><i>positive flexibility</i></a> is set to
724+
the first value, the <a href="#negative-flexibility"><i>negative
725+
flexibility</i></a> is set to the second value, and the <i>preferred
726+
size</i> is set to &lsquo;<code class=css>0px</code>&rsquo;.
727+
728+
<li>Otherwise, If two of the values are non-negative numbers, and the
729+
other is a &lt;length> (with a unit suffix), a &lt;percentage>, or a
730+
valid keyword for &lsquo;<code class=property>width</code>&rsquo; or
731+
&lsquo;<code class=property>height</code>&rsquo;, the <a
728732
href="#positive-flexibility"><i>positive flexibility</i></a> is set to
729733
the first number, the <a href="#negative-flexibility"><i>negative
730734
flexibility</i></a> is set to the second number, and the <i>preferred
@@ -790,10 +794,9 @@ <h2 id=flex-pack><span class=secno>6. </span> The &lsquo;<a
790794
<p>Between and around the margins of <a href="#flexbox-item"><i>flexbox
791795
item</i></a>s there are additional flexible lengths, called <dfn
792796
id=packing-space>packing space</dfn>. Packing space can absorb leftover
793-
free space in a flexbox if there aren't any other <a
794-
href="#flexible-length"><i>flexible length</i></a>s, or if all the <a
795-
href="#flexible-length"><i>flexible length</i></a>s have reached their
796-
maximum size. The &lsquo;<a href="#flex-pack0"><code
797+
free space in a flexbox if there aren't any other <i>flexible length</i>s,
798+
or if all the <i>flexible length</i>s have reached their maximum size. The
799+
&lsquo;<a href="#flex-pack0"><code
797800
class=property>flex-pack</code></a>&rsquo; property defines the
798801
flexibility of these packing spaces:
799802

@@ -925,20 +928,19 @@ <h2 id=flex-align><span class=secno>7. </span> The &lsquo;<a
925928

926929
<p>By default, laying out <a href="#flexbox-item"><i>flexbox item</i></a>s
927930
in the <a href="#length-axis"><i>length axis</i></a> is a simple matter of
928-
determining free space and then splitting it between any <a
929-
href="#flexible-length"><i>flexible length</i></a>s in that axis. This is
930-
not always sufficient, however; in particular, it is often useful to align
931-
<a href="#flexbox-item"><i>flexbox item</i></a>s by their baseline. The
932-
&lsquo;<a href="#flex-align0"><code
931+
determining free space and then splitting it between any <i>flexible
932+
length</i>s in that axis. This is not always sufficient, however; in
933+
particular, it is often useful to align <a href="#flexbox-item"><i>flexbox
934+
item</i></a>s by their baseline. The &lsquo;<a href="#flex-align0"><code
933935
class=property>flex-align</code></a>&rsquo; property changes the way free
934936
space is allocated in the <a href="#length-axis"><i>length axis</i></a>.
935937

936938
<dl>
937939
<dt>auto
938940

939941
<dd>Allocate free space in the <a href="#length-axis"><i>length
940-
axis</i></a> as normal, by distributing it proportionally between <a
941-
href="#flexible-length"><i>flexible length</i></a>s in that axis.
942+
axis</i></a> as normal, by distributing it proportionally between
943+
<i>flexible length</i>s in that axis.
942944

943945
<dt>baseline
944946

@@ -1414,16 +1416,16 @@ <h3 class=no-num id=normative>Normative references</h3>
14141416
<dt id=CSS21>[CSS21]
14151417

14161418
<dd>Bert Bos; et al. <a
1417-
href="http://www.w3.org/TR/2010/WD-CSS2-20101207"><cite>Cascading Style
1418-
Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 December
1419-
2010. W3C Working Draft. (Work in progress.) URL: <a
1420-
href="http://www.w3.org/TR/2010/WD-CSS2-20101207">http://www.w3.org/TR/2010/WD-CSS2-20101207</a>
1419+
href="http://www.w3.org/TR/2009/CR-CSS2-20090423"><cite>Cascading Style
1420+
Sheets Level 2 Revision 1 (CSS&#160;2.1) Specification.</cite></a> 23
1421+
April 2009. W3C Candidate Recommendation. (Work in progress.) URL: <a
1422+
href="http://www.w3.org/TR/2009/CR-CSS2-20090423">http://www.w3.org/TR/2009/CR-CSS2-20090423</a>
14211423
</dd>
14221424
<!---->
14231425

14241426
<dt id=CSS3VAL>[CSS3VAL]
14251427

1426-
<dd>Chris Lilley; H&#229;kon Wium Lie. <a
1428+
<dd>H&#229;kon Wium Lie; Chris Lilley. <a
14271429
href="http://www.w3.org/TR/2006/WD-css3-values-20060919"><cite>CSS3
14281430
Values and Units.</cite></a> 19 September 2006. W3C Working Draft. (Work
14291431
in progress.) URL: <a
@@ -1454,9 +1456,6 @@ <h2 class=no-num id=index>Index</h2>
14541456
<li>flex-direction, <a href="#flex-direction0"
14551457
title=flex-direction><strong>3.</strong></a>
14561458

1457-
<li>flexible length, <a href="#flexible-length" title="flexible
1458-
length"><strong>5.</strong></a>
1459-
14601459
<li>flex-order, <a href="#flex-order0"
14611460
title=flex-order><strong>4.</strong></a>
14621461

css3-flexbox/Overview.src.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,12 @@ <h2 id='flexibility'>
356356
Flexibility</h2>
357357

358358
<p>The defining aspect of flexbox layout is the ability to make various lengths
359-
of the <i>flexbox item</i>s flexible. Flexible lengths can be used for the 'width',
360-
'height', 'padding', and 'margin' properties of <i>flexbox item</i>s. A
361-
<dfn>flexible length</dfn> can grow if the flexbox has extra space available,
362-
or shrink if the flexbox would otherwise overflow. The ''flex()'' function
363-
is used to specify a <i>flexible length</i> and it's parameters.</p>
364-
359+
of the <i>flexbox item</i>s flexible. The 'width', 'height', 'padding', and
360+
'margin' properties of a <i>flexbox item</i> can all be made flexible. Paddings
361+
and margins are made flexible by setting their value to ''auto'', while the
362+
width and height of a box can be controlled more precisely with the ''fr''
363+
unit or the ''flex()'' function, both defined below.</p>
364+
365365
<div class=example>
366366
<p class=issue>TODO: Examples!</p>
367367
</div>
@@ -456,7 +456,12 @@ <h3 id='flex-function'>
456456
<dt>If the ''flex()'' function contains three values:</dt>
457457
<dd>
458458
<ul>
459-
<li>If two of the values are non-negative numbers, and the other
459+
<li>If the first two values are non-negative numbers and the third
460+
value is ''0'', the <i>positive flexibility</i> is set to the first
461+
value, the <i>negative flexibility</i> is set to the second value,
462+
and the <i>preferred size</i> is set to ''0px''.</li>
463+
464+
<li>Otherwise, If two of the values are non-negative numbers, and the other
460465
is a &lt;length> (with a unit suffix), a &lt;percentage>, or a
461466
valid keyword for 'width' or 'height', the <i>positive flexibility</i>
462467
is set to the first number, the <i>negative flexibility</i> is set

0 commit comments

Comments
 (0)