Skip to content

Commit 22b0bdf

Browse files
committed
[css-flexbox] Element/box fixup.
1 parent 5315bee commit 22b0bdf

2 files changed

Lines changed: 57 additions & 57 deletions

File tree

css-flexbox/Overview.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
</p>
247247
<h1 class="p-name no-ref" id=title>CSS Flexible Box Layout Module Level 1</h1>
248248
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
249-
<span class=dt-updated><span class=value-title title=20140211>11 February 2014</span></span></span></h2>
249+
<span class=dt-updated><span class=value-title title=20140212>12 February 2014</span></span></span></h2>
250250
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-flexbox/>http://dev.w3.org/csswg/css-flexbox/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css3-flexbox/>http://www.w3.org/TR/css3-flexbox/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-flexbox/>http://dev.w3.org/csswg/css-flexbox/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/ rel=previous>http://www.w3.org/TR/2012/CR-css3-flexbox-20120918/</a><dd><a href=http://www.w3.org/TR/2012/WD-css3-flexbox-20120612/ rel=previous>http://www.w3.org/TR/2012/WD-css3-flexbox-20120612/</a><dd><a href=http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/ rel=previous>http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/</a><dd><a href=http://www.w3.org/TR/2011/WD-css3-flexbox-20111129/ rel=previous>http://www.w3.org/TR/2011/WD-css3-flexbox-20111129/</a><dd><a href=http://www.w3.org/TR/2011/WD-css3-flexbox-20110322/ rel=previous>http://www.w3.org/TR/2011/WD-css3-flexbox-20110322/</a><dd><a href=http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/ rel=previous>http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/</a>
251251
<dt>Feedback:</dt>
252252
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-flexbox%5D%20feedback">www-style@w3.org</a>
@@ -541,7 +541,7 @@ <h2 class="heading settled heading" data-level=2 id=box-model><span class=secno>
541541
Flex Layout Box Model and Terminology</span><a class=self-link href=#box-model></a></h2>
542542

543543
<p>
544-
An element with <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:flex</a> or <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:inline-flex</a> is a <a data-link-type=dfn href=#flex-container title="flex container">flex container</a>.
544+
A box with <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:flex</a> or <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:inline-flex</a> is a <a data-link-type=dfn href=#flex-container title="flex container">flex container</a>.
545545
Children of a flex container are called <a data-link-type=dfn href=#flex-item title="flex items">flex items</a> and are laid out using the flex layout model.
546546

547547
<p>
@@ -648,7 +648,7 @@ <h2 class="heading settled heading" data-level=3 id=flex-containers><span class=
648648
<li>
649649
<a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-float title=float>float</a> and <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-clear title=clear>clear</a> have no effect on a <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>.
650650
(However, the <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-float title=float>float</a> property still affects the computed value of <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> on children of a flex container,
651-
as this occurs <em title="">before</em> <a data-link-type=dfn href=#flex-item title="flex items">flex items</a> are determined.)
651+
as this occurs <em>before</em> <a data-link-type=dfn href=#flex-item title="flex items">flex items</a> are determined.)
652652

653653
<li>
654654
<a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align title=vertical-align>vertical-align</a> has no effect on a flex item.
@@ -658,8 +658,8 @@ <h2 class="heading settled heading" data-level=3 id=flex-containers><span class=
658658
</ul>
659659

660660
<p>
661-
If an element’s specified <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> is <a class=css data-link-type=maybe href=#valuedef-inline-flex title=inline-flex>inline-flex</a>
662-
and the element is floated or absolutely positioned,
661+
If a box’s specified <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> is <a class=css data-link-type=maybe href=#valuedef-inline-flex title=inline-flex>inline-flex</a>
662+
and the box is floated or absolutely positioned,
663663
the computed value of <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> is <a href=#display-flex><a class=css data-link-type=maybe href=#valuedef-flex title=flex>flex</a></a>.
664664
The table in <a href=http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo>CSS 2.1 Chapter 9.7</a> is thus amended
665665
to contain an additional row,
@@ -690,7 +690,7 @@ <h2 class="heading settled heading" data-level=4 id=flex-items><span class=secno
690690
The computed <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> of a <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>
691691
is determined by applying the table in
692692
<a href=http://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo>CSS 2.1 Chapter 9.7</a>
693-
(except that internal table elements are instead handled by anonymous box fixup, see below).
693+
(except that internal table boxes are instead handled by anonymous box fixup, see below).
694694
However, flex items are flex-level boxes, not block-level boxes:
695695
they participate in their container’s flex formatting context,
696696
not in a block formatting context.
@@ -726,9 +726,9 @@ <h2 class="heading settled heading" data-level=4 id=flex-items><span class=secno
726726
<p>
727727
Some values of <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> trigger the generation of anonymous boxes.
728728
For example, a misparented <span class=css data-link-type=maybe title=table-cell>table-cell</span> child is fixed up
729-
by <a href=http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes>generating anonymous <span class=css data-link-type=maybe title=table>table</span> and <span class=css data-link-type=maybe title=table-row>table-row</span> elements</a> around it. <a data-biblio-type=normative data-link-type=biblio href=#css21 title=css21>[CSS21]</a>
729+
by <a href=http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes>generating anonymous <span class=css data-link-type=maybe title=table>table</span> and <span class=css data-link-type=maybe title=table-row>table-row</span> boxes</a> around it. <a data-biblio-type=normative data-link-type=biblio href=#css21 title=css21>[CSS21]</a>
730730
This fixup must occur <em>before</em> a flex container’s children are promoted to <a data-link-type=dfn href=#flex-item title="flex items">flex items</a>.
731-
For example, given two contiguous child elements with <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:table-cell</a>,
731+
For example, given two contiguous child boxes with <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:table-cell</a>,
732732
an anonymous table wrapper box around them becomes the <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>.
733733

734734
<p class=note>
@@ -750,16 +750,16 @@ <h2 class="heading settled heading" data-level=4 id=flex-items><span class=secno
750750
<h3 class="heading settled heading" data-level=4.1 id=abspos-items><span class=secno>4.1 </span><span class=content>
751751
Absolutely-Positioned Flex Children</span><a class=self-link href=#abspos-items></a></h3>
752752

753-
<p> An absolutely-positioned child element of a <a data-link-type=dfn href=#flex-container title="flex container">flex container</a> does not participate in flex layout
753+
<p> An absolutely-positioned child of a <a data-link-type=dfn href=#flex-container title="flex container">flex container</a> does not participate in flex layout
754754
beyond the <a href=#algo-flex-order>reordering step</a>.
755755

756-
<p> Its static position is calculated by first doing full flex layout without the absolutely-positioned elements,
756+
<p> Its static position is calculated by first doing full flex layout without the absolutely-positioned children,
757757
then positioning each absolutely-positioned child as if it were the sole <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>
758758
in the <a data-link-type=dfn href=#flex-container title="flex container">flex container</a>,
759-
assuming both the element and the <a data-link-type=dfn href=#flex-container title="flex container">flex container</a> were fixed size boxes of their used size.
759+
assuming both the child and the <a data-link-type=dfn href=#flex-container title="flex container">flex container</a> were fixed size boxes of their used size.
760760

761761
<div class=example>
762-
For example, by default, the static position of an absolutely positioned element aligns it to the main-start/cross-start corner,
762+
For example, by default, the static position of an absolutely positioned child aligns it to the main-start/cross-start corner,
763763
corresponding to the default values of <a class=property data-link-type=propdesc href=#propdef-justify-content title=justify-content>justify-content</a> and <a class=property data-link-type=propdesc href=#propdef-align-content title=align-content>align-content</a> on the <a data-link-type=dfn href=#flex-container title="flex container">flex container</a>.
764764
Setting <a class=css data-link-type=propdesc href=#propdef-justify-content title=justify-content>justify-content:center</a> on the <a data-link-type=dfn href=#flex-container title="flex container">flex container</a>, however,
765765
would center it in the main axis.
@@ -799,7 +799,7 @@ <h3 class="heading settled heading" data-level=4.4 id=visibility-collapse><span
799799
Specifying <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visufx.html#propdef-visibility title=visibility>visibility:collapse</a> on a flex item
800800
causes it to become a <dfn data-dfn-type=dfn data-noexport="" id=collapsed-flex-item title="collapsed flex item|collapsed">collapsed flex item<a class=self-link href=#collapsed-flex-item></a></dfn>,
801801
producing an effect similar to <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visufx.html#propdef-visibility title=visibility>visibility:collapse</a> on a table-row or table-column:
802-
the collapsed element is removed from rendering entirely,
802+
the collapsed flex item is removed from rendering entirely,
803803
but leaves behind a "strut" that keeps the flex line’s cross-size stable.
804804
Thus, if a flex container has only one flex line,
805805
dynamically collapsing or uncollapsing items
@@ -812,7 +812,7 @@ <h3 class="heading settled heading" data-level=4.4 id=visibility-collapse><span
812812
Though collapsed flex items aren’t rendered,
813813
they do appear in the <a href=http://www.w3.org/TR/CSS21/intro.html#formatting-structure>formatting structure</a>.
814814
Therefore, unlike on <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display:none</a> items <a data-biblio-type=normative data-link-type=biblio href=#css21 title=css21>[CSS21]</a>,
815-
effects that depend on an element appearing in the formatting structure
815+
effects that depend on a box appearing in the formatting structure
816816
(like incrementing counters or running animations and transitions)
817817
still operate on collapsed items.
818818

@@ -1108,7 +1108,7 @@ <h3 class="heading settled heading" data-level=5.4 id=order-property><span class
11081108
starting from the lowest numbered ordinal group and going up.
11091109
Items with the same ordinal group are laid out in the order they appear in the source document.
11101110
This also affects the <a href=http://www.w3.org/TR/CSS2/zindex.html>painting order</a> <a data-biblio-type=normative data-link-type=biblio href=#css21 title=css21>[CSS21]</a>,
1111-
exactly as if the elements were reordered in the document.
1111+
exactly as if the flex items were reordered in the source document.
11121112

11131113
<div class=example>
11141114
<p>The following figure shows a simple tabbed interface, where the tab for the active pane is always first:
@@ -1132,7 +1132,7 @@ <h3 class="heading settled heading" data-level=5.4 id=order-property><span class
11321132

11331133
<p>
11341134
Unless otherwise specified by a future specification,
1135-
this property has no effect on elements that are not <a data-link-type=dfn href=#flex-item title="flex items">flex items</a>.
1135+
this property has no effect on boxes that are not <a data-link-type=dfn href=#flex-item title="flex items">flex items</a>.
11361136

11371137

11381138

@@ -1332,10 +1332,10 @@ <h3 class="heading settled heading" data-level=7.1 id=flex-property><span class=
13321332
the <a data-link-type=dfn href=#flex-grow-factor title="flex grow factor">flex grow factor</a>
13331333
and <a data-link-type=dfn href=#flex-shrink-factor title="flex shrink factor">flex shrink factor</a>,
13341334
and the <a data-link-type=dfn href=#flex-basis title="flex basis">flex basis</a>.
1335-
When an element is a <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>,
1335+
When a box is a <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>,
13361336
<a class=property data-link-type=propdesc href=#propdef-flex title=flex>flex</a> is consulted <em>instead of</em> the <a data-link-type=dfn href=#main-size-property title="main size property">main size property</a>
1337-
to determine the <a data-link-type=dfn href=#main-size title="main size">main size</a> of the element.
1338-
If an element is not a <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>,
1337+
to determine the <a data-link-type=dfn href=#main-size title="main size">main size</a> of the box.
1338+
If a box is not a <a data-link-type=dfn href=#flex-item title="flex item">flex item</a>,
13391339
<a class=property data-link-type=propdesc href=#propdef-flex title=flex>flex</a> has no effect.
13401340

13411341
<dl data-dfn-for=flex data-dfn-type=value>
@@ -1371,8 +1371,8 @@ <h3 class="heading settled heading" data-level=7.1 id=flex-property><span class=
13711371
When omitted from the <a class=property data-link-type=propdesc href=#propdef-flex title=flex>flex</a> shorthand, its specified value is <span class=css data-link-type=maybe title=0%>0%</span>.
13721372
<p>
13731373
If the specified <a class=property data-link-type=propdesc href=#propdef-flex-basis title=flex-basis>flex-basis</a> is <a class=css-code data-link-for=flex-basis data-link-type=value href=#valuedef-auto0 title=auto>auto</a>,
1374-
the used <a data-link-type=dfn href=#flex-basis title="flex basis">flex basis</a> is the value of the element’s <a data-link-type=dfn href=#main-size-property title="main size property">main size property</a>.
1375-
(This can itself be the keyword <a class=css-code data-link-for=width data-link-type=value title=auto>auto</a>, which sizes the element based on its contents.)
1374+
the used <a data-link-type=dfn href=#flex-basis title="flex basis">flex basis</a> is the value of the flex item’s <a data-link-type=dfn href=#main-size-property title="main size property">main size property</a>.
1375+
(This can itself be the keyword <a class=css-code data-link-for=width data-link-type=value title=auto>auto</a>, which sizes the flex item based on its contents.)
13761376

13771377
</p><figure>
13781378
<img height=240 src=images/rel-vs-abs-flex.svg width=504>
@@ -1558,7 +1558,7 @@ <h3 class="heading settled heading" data-level=8.1 id=auto-margins><span class=s
15581558
any positive free space is distributed to auto margins in that dimension.
15591559

15601560
<li>
1561-
Overflowing elements ignore their auto margins and overflow in the <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#end title=end>end</a> direction.
1561+
Overflowing boxes ignore their auto margins and overflow in the <a data-link-type=dfn href=http://dev.w3.org/csswg/css-writing-modes-3/#end title=end>end</a> direction.
15621562
</ul>
15631563

15641564
<p class=note>
@@ -1735,8 +1735,8 @@ <h3 class="heading settled heading" data-level=8.3 id=align-items-property><span
17351735

17361736
<p>
17371737
A value of <dfn class=css-code data-dfn-for=align-self data-dfn-type=value data-export="" id=valuedef-auto>auto<a class=self-link href=#valuedef-auto></a></dfn> for <a class=property data-link-type=propdesc href=#propdef-align-self title=align-self>align-self</a>
1738-
computes to the value of <a class=property data-link-type=propdesc href=#propdef-align-items title=align-items>align-items</a> on the element’s parent,
1739-
or <a class=css-code data-link-for=align-self data-link-type=value href=#valuedef-stretch0 title=stretch>stretch</a> if the element has no parent.
1738+
computes to the value of <a class=property data-link-type=propdesc href=#propdef-align-items title=align-items>align-items</a> on the flex item’s parent,
1739+
or <a class=css-code data-link-for=align-self data-link-type=value href=#valuedef-stretch0 title=stretch>stretch</a> if the flex item has no parent.
17401740
The alignments are defined as:
17411741

17421742
<dl data-dfn-for="align-items align-self" data-dfn-type=value>
@@ -2015,10 +2015,10 @@ <h3 class="heading settled heading" data-level=9.1 id=box-manip><span class=secn
20152015

20162016
<li id=algo-flex-order><a class=self-link href=#algo-flex-order></a>
20172017
<strong>Re-order the flex items and absolutely positioned flex container children according to their <a class=property data-link-type=propdesc href=#propdef-order title=order>order</a>.</strong>
2018-
The elements with the lowest (most negative) <a class=property data-link-type=propdesc href=#propdef-order title=order>order</a> values are first in the ordering.
2019-
If multiple elements share an <a class=property data-link-type=propdesc href=#propdef-order title=order>order</a> value,
2018+
The flex items with the lowest (most negative) <a class=property data-link-type=propdesc href=#propdef-order title=order>order</a> values are first in the ordering.
2019+
If multiple flex items share an <a class=property data-link-type=propdesc href=#propdef-order title=order>order</a> value,
20202020
they’re ordered by document order.
2021-
This affects the order in which the elements generate boxes in the box-tree,
2021+
This effectively changes the order of their boxes in the box-tree,
20222022
and how the rest of this algorithm deals with the generated flex items.
20232023
</ol>
20242024

@@ -2463,7 +2463,7 @@ <h2 class="heading settled heading" data-level=10 id=pagination><span class=secn
24632463
and inside items.
24642464
The <a class=css-code data-link-type=property href=http://dev.w3.org/csswg/css-break-3/#break-before title=break-before>break-*</a> properties apply to flex containers as normal for block-level or inline-level boxes.
24652465
This section defines how they apply to flex items
2466-
and elements inside flex items.
2466+
and the contents of flex items.
24672467

24682468
<p>
24692469
The following breaking rules refer to the fragmentation container as the “page”.
@@ -2824,7 +2824,7 @@ <h2 class="no-num heading settled heading" id=changes><span class=content>Change
28242824
<li>
28252825
Absolutely positioned children of a flex container are no longer called "flex items" (to avoid terminology confusion).
28262826
<li>
2827-
Clarified that <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-float title=float>float</a> still makes the children of a flex container turn into block-level elements.
2827+
Clarified that <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-float title=float>float</a> still affects the computed <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/visuren.html#propdef-display title=display>display</a> (which may affect box-fixup rules that run prior to flex item determination).
28282828
<li>
28292829
Clarified that table anonymous box generation occurs in place of computed value conversion for internal table elements.
28302830
<li>

0 commit comments

Comments
 (0)