Skip to content

Commit 1a7fb5b

Browse files
committed
[css-flexbox] Fix timeless's nits, part I <https://lists.w3.org/Archives/Public/www-style/2015Jun/0075.html>
1 parent 1283637 commit 1a7fb5b

5 files changed

Lines changed: 91 additions & 15 deletions

File tree

css-flexbox/Overview.bs

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ Flex Items</h2>
551551
However, an anonymous flex item that contains only
552552
<a href="http://www.w3.org/TR/CSS2/text.html#white-space-prop">white space</a>
553553
(i.e. characters that can be affected by the 'white-space' property)
554-
is not rendered, as if it were ''display:none''.
554+
is not rendered (just as if it were ''display:none'').
555555

556556
<div class="example">
557557
<p>Examples of flex items:
@@ -576,6 +576,33 @@ Flex Items</h2>
576576
&lt;/span>
577577
&lt;/div>
578578
</pre>
579+
580+
<figure>
581+
<figcaption>Flex items determined from above code block</figcaption>
582+
<a href="examples/flex-item-determination.html">
583+
<object type="image/png" data="images/flex-item-determination.png">
584+
<ol>
585+
<li>Flex item containing <samp>block</samp>.
586+
<li>Flex item containing <samp>float</samp>.
587+
<li>(Anonymous, unstyleable) flex item containing <samp>anonymous item 3</samp>.
588+
<li>Flex item containing three blocks in succession:
589+
<ul>
590+
<li>Anonymous block containing <samp>item 4</samp>.
591+
<li><code>&lt;q></code> element block containing <samp>item 4</samp>.
592+
<li>Anonymous block containing <samp>item 4</samp>.
593+
</ul>
594+
</ol>
595+
</object>
596+
</a>
597+
</figure>
598+
599+
Note that the inter-element white space disappears:
600+
it does not become its own flex item,
601+
even though the inter-element text <em>does</em> get wrapped in an anonymous flex item.
602+
603+
Note also that the anonymous item's box is unstyleable,
604+
since there is no element to assign style rules to.
605+
Its contents will however inherit styles (such as font settings) from the flex container.
579606
</div>
580607

581608
A <a>flex item</a> establishes a new formatting context for its contents.
@@ -976,7 +1003,7 @@ Flex Flow Direction: the 'flex-direction' property</h3>
9761003

9771004
The 'flex-direction' property specifies how <a>flex items</a> are placed in the flex container,
9781005
by setting the direction of the flex container's <a>main axis</a>.
979-
This determines the direction that flex items are laid out in.
1006+
This determines the direction in which flex items are laid out.
9801007

9811008
<dl dfn-type=value dfn-for=flex-direction>
9821009
<dt><dfn>row</dfn>
@@ -1351,7 +1378,7 @@ Flex Lines</h2>
13511378
In a <a>multi-line</a> <a>flex container</a> (even one with only a single line),
13521379
the <a>cross size</a> of each line
13531380
is the minimum size necessary to contain the <a>flex items</a> on the line
1354-
(after aligment due to 'align-self'),
1381+
(after alignment due to 'align-self'),
13551382
and the lines are aligned within the flex container with the 'align-content' property.
13561383
In a <a>single-line</a> <a>flex container</a>,
13571384
the <a>cross size</a> of the line is the <a>cross size</a> of the flex container,
@@ -2783,14 +2810,14 @@ Fragmenting Flex Layout</h2>
27832810
the entire fragment is moved to the next page.
27842811

27852812
<li>
2786-
When a <a>multi-line</a> colum flex container breaks,
2813+
When a <a>multi-line</a> column flex container breaks,
27872814
each fragment has its own "stack" of flex lines,
27882815
just like each fragment of a multi-column element
27892816
has its own row of column boxes.
27902817

27912818
<li>
27922819
Aside from the rearrangement of items imposed by the previous point,
2793-
UAs should attempt to minimize distortation of the flex container
2820+
UAs should attempt to minimize distortion of the flex container
27942821
with respect to unfragmented flow.
27952822
</ul>
27962823

css-flexbox/Overview.html

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
<div class="head">
304304
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72"> </a></p>
305305
<h1 class="p-name no-ref" id="title">CSS Flexible Box Layout Module Level 1</h1>
306-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2015-08-31">31 August 2015</time></span></h2>
306+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2015-09-01">1 September 2015</time></span></h2>
307307
<div data-fill-with="spec-metadata">
308308
<dl>
309309
<dt>This version:
@@ -749,9 +749,9 @@ <h2 class="heading settled" data-level="4" id="flex-items"><span class="secno">4
749749
<p>Each in-flow child of a <a data-link-type="dfn" href="#flex-container">flex container</a> becomes a <a data-link-type="dfn" href="#flex-item">flex item</a>,
750750
and each contiguous run of text that is directly contained inside a <a data-link-type="dfn" href="#flex-container">flex container</a> is wrapped in an anonymous <a data-link-type="dfn" href="#flex-item">flex item</a>.
751751
However, an anonymous flex item that contains only <a href="http://www.w3.org/TR/CSS2/text.html#white-space-prop">white space</a> (i.e. characters that can be affected by the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-text-3/#propdef-white-space">white-space</a> property)
752-
is not rendered, as if it were <span class="css">display:none</span>.</p>
753-
<div class="example" id="example-25a54dcc">
754-
<a class="self-link" href="#example-25a54dcc"></a>
752+
is not rendered (just as if it were <span class="css">display:none</span>).</p>
753+
<div class="example" id="example-08a64279">
754+
<a class="self-link" href="#example-08a64279"></a>
755755
<p>Examples of flex items: </p>
756756
<pre class="lang-markup">&lt;div style="display:flex">
757757

@@ -773,6 +773,16 @@ <h2 class="heading settled" data-level="4" id="flex-items"><span class="secno">4
773773
&lt;/span>
774774
&lt;/div>
775775
</pre>
776+
<figure>
777+
<figcaption>Flex items determined from above code block</figcaption>
778+
<a href="examples/flex-item-determination.html"> <object data="images/flex-item-determination.png" type="image/png"> <ol> <li>Flex item containing <samp>block</samp>. </li><li>Flex item containing <samp>float</samp>. </li><li>(Anonymous, unstyleable) flex item containing <samp>anonymous item 3</samp>. </li><li>Flex item containing three blocks in succession: <ul> <li>Anonymous block containing <samp>item 4</samp>. </li><li><code>&lt;q></code> element block containing <samp>item 4</samp>. </li><li>Anonymous block containing <samp>item 4</samp>. </li></ul> </li></ol> </object> </a>
779+
</figure>
780+
<p>Note that the inter-element white space disappears:
781+
it does not become its own flex item,
782+
even though the inter-element text <em>does</em> get wrapped in an anonymous flex item.</p>
783+
<p>Note also that the anonymous item’s box is unstyleable,
784+
since there is no element to assign style rules to.
785+
Its contents will however inherit styles (such as font settings) from the flex container.</p>
776786
</div>
777787
<p>A <a data-link-type="dfn" href="#flex-item">flex item</a> establishes a new formatting context for its contents.
778788
The type of this formatting context is determined by its <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-display">display</a> value, as usual.
@@ -1394,7 +1404,7 @@ <h2 class="heading settled" data-level="6" id="flex-lines"><span class="secno">6
13941404
<p>In a <a data-link-type="dfn" href="#multi-line">multi-line</a><a data-link-type="dfn" href="#flex-container">flex container</a> (even one with only a single line),
13951405
the <a data-link-type="dfn" href="#cross-size">cross size</a> of each line
13961406
is the minimum size necessary to contain the <a data-link-type="dfn" href="#flex-item">flex items</a> on the line
1397-
(after aligment due to <a class="property" data-link-type="propdesc" href="#propdef-align-self">align-self</a>),
1407+
(after alignment due to <a class="property" data-link-type="propdesc" href="#propdef-align-self">align-self</a>),
13981408
and the lines are aligned within the flex container with the <a class="property" data-link-type="propdesc" href="#propdef-align-content">align-content</a> property.
13991409
In a <a data-link-type="dfn" href="#single-line">single-line</a><a data-link-type="dfn" href="#flex-container">flex container</a>,
14001410
the <a data-link-type="dfn" href="#cross-size">cross size</a> of the line is the <a data-link-type="dfn" href="#cross-size">cross size</a> of the flex container,
@@ -2478,12 +2488,12 @@ <h2 class="heading settled" data-level="10" id="pagination"><span class="secno">
24782488
<li> If the first fragment of the flex container is not at the top of the page,
24792489
and some of its flex items don’t fit in the remaining space on the page,
24802490
the entire fragment is moved to the next page.
2481-
<li> When a <a data-link-type="dfn" href="#multi-line">multi-line</a> colum flex container breaks,
2491+
<li> When a <a data-link-type="dfn" href="#multi-line">multi-line</a> column flex container breaks,
24822492
each fragment has its own "stack" of flex lines,
24832493
just like each fragment of a multi-column element
24842494
has its own row of column boxes.
24852495
<li> Aside from the rearrangement of items imposed by the previous point,
2486-
UAs should attempt to minimize distortation of the flex container
2496+
UAs should attempt to minimize distortion of the flex container
24872497
with respect to unfragmented flow.
24882498
</ul>
24892499
<h3 class="heading settled" data-level="10.1" id="pagination-algo"><span class="secno">10.1. </span><span class="content"> Sample Flex Fragmentation Algorithm</span><a class="self-link" href="#pagination-algo"></a></h3>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<style>
3+
/* Flex it */
4+
.container { display: flex; }
5+
6+
/* Make it pretty */
7+
div, span {
8+
margin: 0.125em;
9+
padding: 0.125em;
10+
border-radius: 0.25em;
11+
list-style: none;
12+
color: white;
13+
text-align: center;
14+
}
15+
.container { background: #444; float: left; }
16+
.container > * { background: #888; }
17+
</style>
18+
19+
20+
<div class="container">
21+
22+
<!-- flex item: block child -->
23+
<div id="item1">block</div>
24+
25+
<!-- flex item: floated element; floating is ignored -->
26+
<div id="item2" style="float: left;">float</div>
27+
28+
<!-- flex item: anonymous block box around inline content -->
29+
anonymous item 3
30+
<!-- note that since it has no wrapper element this item can't be styled! -->
31+
32+
<!-- flex item: inline child -->
33+
<span>
34+
item 4
35+
<!-- flex items do not split around blocks -->
36+
<q style="display: block" id=not-an-item>item 4</q>
37+
item 4
38+
</span>
39+
</div>
3.23 KB
Loading

css-flexbox/issues-lc-20150514.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Issue 2.
1414
Summary: Should min/max-content sizes of flex containers include flex-basis?
1515
From: fantasai
1616
Comment: http://www.w3.org/mid/55D6D14A.3010202@inkedblade.net
17-
Response:
18-
Open: Retracted, needs editing.
17+
Response: None needed
18+
Closed: Retracted
1919
Resolved: [Paris F2F]
2020
----
2121
Issue 3.
@@ -43,7 +43,7 @@ Issue 6.
4343
Summary: Do flex item determination before anonymous box fixup.
4444
From: fantasai
4545
Comment: http://www.w3.org/mid/55A95E05.8040208@inkedblade.net
46-
Open: Needs editing
46+
Closed: Accepted
4747
Resolved: [Paris F2F]
4848
----
4949
Issue 7.

0 commit comments

Comments
 (0)