Skip to content

Commit af65775

Browse files
committed
Swap placement of note and normative prose around flex item generation, so that normative prose doesn't get lost after the example. Fix up abspos section to correctly reflect atomic-ness of placeholders.
1 parent a919600 commit af65775

2 files changed

Lines changed: 68 additions & 67 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040

4141
<h1 id=head-box-flexible>CSS Flexible Box Layout Module</h1>
4242

43-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 18 May 2012</h2>
43+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 22 May 2012</h2>
4444

4545
<dl>
4646
<dt>This version:
47-
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120518/">http://www.w3.org/TR/2012/WD-css3-flexbox-20120518/</a>-->
47+
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120522/">http://www.w3.org/TR/2012/WD-css3-flexbox-20120522/</a>-->
4848

4949

5050
<dd><a
@@ -204,14 +204,16 @@ <h2 class="no-num no-toc" id=table>Table of contents</h2>
204204

205205
<li><a href="#flex-items"><span class=secno>4. </span> Flex Items</a>
206206
<ul class=toc>
207-
<li><a href="#abspos-flex-items"><span class=secno>4.1. </span>
208-
Absolutely Positioned Flex Container Children</a>
207+
<li><a href="#flex-item-margins"><span class=secno>4.1. </span> Flex
208+
Item Margins</a>
209209

210-
<li><a href="#visibility-collapse"><span class=secno>4.2. </span>
211-
Effects of ‘<code class=css>visibility:collapse</code>’ on Flex
212-
Items</a>
210+
<li><a href="#abspos-flex-items"><span class=secno>4.2. </span>
211+
Out-of-flow Items</a>
213212

214-
<li><a href="#min-size-auto"><span class=secno>4.3. </span> Implied
213+
<li><a href="#visibility-collapse"><span class=secno>4.3. </span>
214+
Collapsed Items</a>
215+
216+
<li><a href="#min-size-auto"><span class=secno>4.4. </span> Implied
215217
Minimum Size of Flex Items</a>
216218
</ul>
217219

@@ -626,9 +628,13 @@ <h2 id=flex-items><span class=secno>4. </span> Flex Items</h2>
626628
<em>before</em> a flex container's contents are checked to see if it's
627629
necessary to generate anonymous flex items.
628630

629-
<p class=note> Future display types may generate anonymous containers (e.g.
630-
ruby) or otherwise mangle the box tree (e.g. run-ins). It is intended that
631-
flex item determination run after these operations.
631+
<p> The computed value for ‘<code class=property>display</code>’ for
632+
elements that are <a href="#flex-item"><i>flex items</i></a> must be
633+
determined by applying the table in <a
634+
href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">CSS 2.1 Chapter
635+
9.7</a>. <span class=note>This is expected to be superseded by a future
636+
specification that defines a new ‘<code class=property>display</code>
637+
value for flex items.</span>
632638

633639
<div class=example>
634640
<p>Examples of flex items:
@@ -686,30 +692,28 @@ <h2 id=flex-items><span class=secno>4. </span> Flex Items</h2>
686692
positioned children have special treatment.
687693
</div>
688694

689-
<p> The computed value for ‘<code class=property>display</code>’ for
690-
elements that are <a href="#flex-item"><i>flex items</i></a> must be
691-
determined by applying the table in <a
692-
href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">CSS 2.1 Chapter
693-
9.7</a>. <span class=note>This is expected to be superseded by a future
694-
specification that defines a new ‘<code class=property>display</code>
695-
value for flex items.</span>
695+
<p class=note> Future display types may generate anonymous containers (e.g.
696+
ruby) or otherwise mangle the box tree (e.g. run-ins). It is intended that
697+
flex item determination run after these operations.
698+
699+
<h3 id=flex-item-margins><span class=secno>4.1. </span> Flex Item Margins</h3>
696700

697701
<p> The margins of adjacent <a href="#flex-item"><i>flex items</i></a> do
698-
not collapse.
702+
not collapse. Auto margins absorb extra space in that dimension and can be
703+
used for alignment and to push adjacent flex items apart; see <a
704+
href="#auto-margins">Aligning with ‘<code class=css>auto</code>
705+
margins</a>.
699706

700-
<h3 id=abspos-flex-items><span class=secno>4.1. </span> Absolutely
701-
Positioned Flex Container Children</h3>
707+
<h3 id=abspos-flex-items><span class=secno>4.2. </span> Out-of-flow Items</h3>
702708

703-
<p> Absolutely positioned children of a flex container are not <a
704-
href="#flex-item"><i>flex items</i></a>, but they leave behind
709+
<p> Absolutely positioned children of a flex container are not themselves
710+
<a href="#flex-item"><i>flex items</i></a>, but they leave behind
705711
"placeholders" in their normal position in the box tree. These
706-
placeholders are anonymous atomic inline boxes with a width and height of
707-
<code class=css>0</code>’, and they interact normally with the flex
708-
layout algorithm. In particular, they'll trigger the creation an anonymous
709-
flex item wrapper boxes, or join neighboring inline elements in
710-
<em>their</em> anonymous flex item wrapper boxes.
712+
placeholders are atomic inline boxes with a width, height, and flex of
713+
<code class=css>0</code>’, becoming zero-sized flex items that
714+
otherwise interact normally with the flex layout algorithm.
711715

712-
<p> The "static position" of an absolutely positioned child of a flex
716+
<p> The <i>static position</i> of an absolutely positioned child of a flex
713717
container (the position when the ‘<code
714718
class=property>top</code>’/‘<code
715719
class=property>right</code>’/‘<code
@@ -718,18 +722,14 @@ <h3 id=abspos-flex-items><span class=secno>4.1. </span> Absolutely
718722
class=css>auto</code></a>’), then, is the final position of its
719723
corresponding placeholder, after flex layout has been performed.
720724

721-
<p class=note> Note: In most cases, this means that absolutely positioned
722-
items will have no effect on flex layout, even if they force the
723-
generation of an anonymous flex item wrapper, because those wrapper items
724-
will also collapse to zero size and have no effect. The only exceptions
725-
are when the flex container has ‘<code
726-
class=css>flex-pack:justify</code>’ or ‘<code
727-
class=css>flex-pack:distribute</code>’, in which case the anonymous flex
728-
item will cause there to be two packing spaces where there would otherwise
729-
be only one, resulting in a double-size space between two "real" items.
725+
<p class=note> Note: In most cases, this means that absolutely-positioned
726+
items have no effect on flex layout. However, when the flex container has
727+
<code class=css>flex-pack:justify</code>’ or ‘<code
728+
class=css>flex-pack:distribute</code>’, each placeholder flex item will
729+
cause there to be two packing spaces where there would otherwise be only
730+
one, possibly resulting in increased space between two "real" items.
730731

731-
<h3 id=visibility-collapse><span class=secno>4.2. </span> Effects of
732-
<code class=css>visibility:collapse</code>’ on Flex Items</h3>
732+
<h3 id=visibility-collapse><span class=secno>4.3. </span> Collapsed Items</h3>
733733

734734
<p> Using ‘<code class=css>visibility:collapse</code>’ on a flex item
735735
produces an effect similar to ‘<code
@@ -766,7 +766,7 @@ <h3 id=visibility-collapse><span class=secno>4.2. </span> Effects of
766766
algorithm is defined <a href="#layout-algorithm">later in this
767767
specification</a>.
768768

769-
<h3 id=min-size-auto><span class=secno>4.3. </span> Implied Minimum Size of
769+
<h3 id=min-size-auto><span class=secno>4.4. </span> Implied Minimum Size of
770770
Flex Items</h3>
771771

772772
<p> To provide a more reasonable default minimum size for flex containers,
@@ -3645,7 +3645,7 @@ <h2 class=no-num id=index>Index</h2>
36453645
title=main-start><strong>2.</strong></a>
36463646

36473647
<li>min-width/height:auto, <a href="#min-auto"
3648-
title="min-width/height:auto"><strong>4.3.</strong></a>
3648+
title="min-width/height:auto"><strong>4.4.</strong></a>
36493649

36503650
<li>multi-line, <a href="#multi-line"
36513651
title=multi-line><strong>6.</strong></a>

css3-flexbox/Overview.src.html

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,10 @@ <h2 id='flex-items'>
314314
For example, a ''table-cell'' child of a block container is fixed up by generating ''table'' and ''table-row'' elements around it.
315315
This fixup must occur <em>before</em> a flex container's contents are checked to see if it's necessary to generate anonymous flex items.
316316

317-
<p class='note'>
318-
Future display types may generate anonymous containers (e.g. ruby) or otherwise mangle the box tree (e.g. run-ins).
319-
It is intended that flex item determination run after these operations.
317+
<p>
318+
The computed value for 'display' for elements that are <i>flex items</i>
319+
must be determined by applying the table in <a href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">CSS 2.1 Chapter 9.7</a>.
320+
<span class='note'>This is expected to be superseded by a future specification that defines a new 'display' value for flex items.</span>
320321

321322
<div class="example">
322323
<p>Examples of flex items:
@@ -375,43 +376,43 @@ <h2 id='flex-items'>
375376
because absolutely positioned children have special treatment.
376377
</div>
377378

378-
<p>
379-
The computed value for 'display' for elements that are <i>flex items</i>
380-
must be determined by applying the table in <a href="http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">CSS 2.1 Chapter 9.7</a>.
381-
<span class='note'>This is expected to be superseded by a future specification that defines a new 'display' value for flex items.</span>
379+
<p class='note'>
380+
Future display types may generate anonymous containers (e.g. ruby) or otherwise mangle the box tree (e.g. run-ins).
381+
It is intended that flex item determination run after these operations.
382+
383+
<h3 id=flex-item-margins>
384+
Flex Item Margins</h3>
382385

383386
<p>
384387
The margins of adjacent <i>flex items</i> do not collapse.
388+
Auto margins absorb extra space in that dimension and can be used for alignment
389+
and to push adjacent flex items apart;
390+
see <a href="#auto-margins">Aligning with ''auto'' margins</a>.
385391

386392
<h3 id='abspos-flex-items'>
387-
Absolutely Positioned Flex Container Children</h3>
393+
Out-of-flow Items</h3>
388394

389395
<p>
390-
Absolutely positioned children of a flex container are not <i>flex items</i>,
391-
but they leave behind "placeholders" in their normal position in the box tree.
392-
These placeholders are anonymous atomic inline boxes with a width and height of ''0'',
393-
and they interact normally with the flex layout algorithm.
394-
In particular,
395-
they'll trigger the creation an anonymous flex item wrapper boxes,
396-
or join neighboring inline elements in <em>their</em> anonymous flex item wrapper boxes.
396+
Absolutely positioned children of a flex container are not themselves <i>flex items</i>,
397+
but they leave behind "placeholders" in their normal position in the box tree.
398+
These placeholders are atomic inline boxes with a width, height, and flex of ''0'',
399+
becoming zero-sized flex items that otherwise interact normally with the flex layout algorithm.
397400

398401
<p>
399-
The "static position" of an absolutely positioned child of a flex container
400-
(the position when the 'top'/'right'/'bottom'/'left' properties are ''auto''),
401-
then,
402+
The <i>static position</i> of an absolutely positioned child of a flex container
403+
(the position when the 'top'/'right'/'bottom'/'left' properties are ''auto''), then,
402404
is the final position of its corresponding placeholder, after flex layout has been performed.
403405

404406
<p class='note'>
405407
Note: In most cases,
406-
this means that absolutely positioned items will have no effect on flex layout,
407-
even if they force the generation of an anonymous flex item wrapper,
408-
because those wrapper items will also collapse to zero size and have no effect.
409-
The only exceptions are when the flex container has ''flex-pack:justify'' or ''flex-pack:distribute'',
410-
in which case the anonymous flex item will cause there to be two packing spaces where there would otherwise be only one,
411-
resulting in a double-size space between two "real" items.
408+
this means that absolutely-positioned items have no effect on flex layout.
409+
However, when the flex container has ''flex-pack:justify'' or ''flex-pack:distribute'',
410+
each placeholder flex item will cause there to be two packing spaces
411+
where there would otherwise be only one,
412+
possibly resulting in increased space between two "real" items.
412413

413414
<h3 id='visibility-collapse'>
414-
Effects of ''visibility:collapse'' on Flex Items</h3>
415+
Collapsed Items</h3>
415416

416417
<p>
417418
Using ''visibility:collapse'' on a flex item

0 commit comments

Comments
 (0)