Skip to content

Commit ea3c415

Browse files
committed
(merge)
2 parents 274abad + abbf3c3 commit ea3c415

2 files changed

Lines changed: 117 additions & 69 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 85 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@
206206

207207
<h1 id=head-box-flexible>CSS Flexible Box Layout Module</h1>
208208

209-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 7 August 2012</h2>
209+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 8 August 2012</h2>
210210

211211
<dl>
212212
<dt>This version:
213-
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120807/">http://www.w3.org/TR/2012/WD-css3-flexbox-20120807/</a>-->
213+
<!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120808/">http://www.w3.org/TR/2012/WD-css3-flexbox-20120808/</a>-->
214214

215215

216216
<dd><a
@@ -576,10 +576,10 @@ <h3 id=overview><span class=secno>1.1. </span> Overview</h3>
576576
<li> can be laid out in any <a href="#flex-direction-property">flow
577577
direction</a> (leftwards, rightwards, downwards, or even upwards!)
578578

579-
<li> can have their visual order <a
579+
<li> can have their display order <a
580580
href="#flex-flow-row-reverse">reversed</a> or <a
581-
href="#order-property">rearranged</a> at the style layer (i.e., display
582-
order can be independent of source order)
581+
href="#order-property">rearranged</a> at the style layer (i.e., visual
582+
order can be independent of source and speech order)
583583

584584
<li> can be laid out linearly along a single (<a href="#main-axis"><i
585585
title="main axis">main</i></a>) axis or <a
@@ -602,26 +602,28 @@ <h3 id=overview><span class=secno>1.1. </span> Overview</h3>
602602
<p> Here's an example of a catalog where each item has a title, an photo,
603603
a description, and a purchase button. The designer's intention is that
604604
each entry has the same overall size, that the photo be above the text,
605-
and the purchase buttons aligned at the bottom, regardless of the length
606-
of the item's description. Flex layout makes many aspects of this design
607-
easy:
605+
and that the purchase buttons aligned at the bottom, regardless of the
606+
length of the item's description. Flex layout makes many aspects of this
607+
design easy:
608608

609609
<ul>
610-
<li> The catalog uses flex layout to lay out a row of items horizontally,
611-
and to ensure they're all equal-height. Each entry is then itself a
612-
column flex container, laying out its contents vertically.
613-
614-
<li> Within each entry, content is ordered logically with the title
615-
first, followed by the description and the photo. This provides a
616-
sensible ordering for speech rendering and in non-CSS browsers. For a
617-
more compelling visual presentation, however, ‘<a href="#order"><code
618-
class=property>order</code></a>’ is used to pull the image up from
619-
later in the content to the top, and ‘<a href="#align-self"><code
620-
class=property>align-self</code></a>’ to center it horizontally.
610+
<li> The catalog uses flex layout to lay out rows of items horizontally,
611+
and to ensure that items within a row are all equal-height. Each entry
612+
is then itself a column flex container, laying out its contents
613+
vertically.
614+
615+
<li> Within each entry, the source document content is ordered logically
616+
with the title first, followed by the description and the photo. This
617+
provides a sensible ordering for speech rendering and in non-CSS
618+
browsers. For a more compelling visual presentation, however, ‘<a
619+
href="#order"><code class=property>order</code></a>’ is used to pull
620+
the image up from later in the content to the top, and ‘<a
621+
href="#align-self"><code class=property>align-self</code></a>’ is used
622+
to center it horizontally.
621623

622624
<li> An <a href="#auto-margins"><code class=css>auto</code>
623-
margin</a> above the purchase button forces it to the bottom of the
624-
entry box, regardless of the height of the description.
625+
margin</a> above the purchase button forces it to the bottom within each
626+
entry box, regardless of the height of that item's description.
625627
</ul>
626628

627629
<pre>
@@ -1301,6 +1303,19 @@ <h2 id=ordering-and-orientation><span class=secno>5. </span> Ordering and
13011303
class=property>flex-wrap</code></a>’, and ‘<a href="#order"><code
13021304
class=property>order</code></a>’ properties.
13031305

1306+
<p class=note> The reordering capabilities of flex layout intentionally
1307+
affect <em>only the visual rendering</em>, leaving speech order and
1308+
navigation based on the source order. This allows authors to manipulate
1309+
the visual presentation while leaving the source order intact for non-CSS
1310+
UAs and for linear models such as speech and sequential navigation. See <a
1311+
href="#order-accessibility">Reordering and Accessibility</a> and the <a
1312+
href="#overview">Flex Layout Overview</a> for examples that use this
1313+
dichotomy to improve accessibility.
1314+
1315+
<p> Authors <em>must not</em> use these techniques as a substitute for
1316+
correct source ordering, as that can ruin the accessibility of the
1317+
document.
1318+
13041319
<h3 id=flex-direction-property><span class=secno>5.1. </span> Flex Flow
13051320
Direction: the ‘<a href="#flex-direction"><code
13061321
class=property>flex-direction</code></a>’ property</h3>
@@ -1723,8 +1738,8 @@ <h4 id=order-accessibility><span class=secno>5.4.1. </span>Reordering and
17231738
Accessibility</h4>
17241739

17251740
<p> The ‘<a href="#order"><code class=property>order</code></a>
1726-
property <em>must not</em> affect ordering in non-visual media (such as <a
1727-
href="http://www.w3.org/TR/css3-speech/">speech</a>). Similarly, ‘<a
1741+
property <em>does not</em> affect ordering in non-visual media (such as <a
1742+
href="http://www.w3.org/TR/css3-speech/">speech</a>). Likewise, ‘<a
17281743
href="#order"><code class=property>order</code></a>’ does not affect the
17291744
default traversal order of sequential navigation modes (such as cycling
17301745
through links, see e.g. ‘<code class=property>nav-index</code><a
@@ -1737,10 +1752,11 @@ <h4 id=order-accessibility><span class=secno>5.4.1. </span>Reordering and
17371752
class=property>order</code></a>’ to perform logical reordering are
17381753
non-conforming.
17391754

1740-
<p class=note> This is so non-visual media and non-CSS UAs, which typically
1741-
present content linearly, can be catered to with a logical source order,
1755+
<p class=note> This is so that non-visual media and non-CSS UAs, which
1756+
typically present content linearly, can rely on a logical source order,
17421757
while ‘<a href="#order"><code class=property>order</code></a>’ is used
1743-
to rearrange the visual order.
1758+
to tailor the visual order. (Since visual perception is two-dimensional
1759+
and non-linear, the desired visual order is not always logical.)
17441760

17451761
<div class=example>
17461762
<p> Many web pages have a similar shape in the markup, with a header on
@@ -4000,7 +4016,7 @@ <h2 class=no-num id=property>Property index</h2>
40004016

40014017
<td>no
40024018

4003-
<td>specified value
4019+
<td>
40044020

40054021
<td>visual
40064022

@@ -4015,7 +4031,7 @@ <h2 class=no-num id=property>Property index</h2>
40154031

40164032
<td>no
40174033

4018-
<td>specified value
4034+
<td>
40194035

40204036
<td>visual
40214037

@@ -4030,31 +4046,24 @@ <h2 class=no-num id=property>Property index</h2>
40304046

40314047
<td>no
40324048

4033-
<td>‘auto’ computes to parent's ‘align-items’; otherwise as
4034-
specified
4049+
<td>
40354050

40364051
<td>visual
40374052

40384053
<tr>
40394054
<th><span class=property>display</span>
40404055

4041-
<td>flex | inline-flex
4042-
4043-
<tr>
4044-
<th><a class=property href="#flex">flex</a>
4045-
4046-
<td>none | [ &lt;&apos;flex-grow&apos;> &lt;&apos;flex-shrink&apos;>? ||
4047-
&lt;&apos;flex-basis&apos;> ]
4056+
<td>
40484057

4049-
<td>see individual properties
4058+
<td>
40504059

4051-
<td>flex items
4060+
<td>
40524061

4053-
<td>see individual properties
4062+
<td>
40544063

4055-
<td>see individual properties
4064+
<td>
40564065

4057-
<td>visual
4066+
<td>
40584067

40594068
<tr>
40604069
<th><a class=property href="#flex-basis-propdef">flex-basis</a>
@@ -4067,10 +4076,10 @@ <h2 class=no-num id=property>Property index</h2>
40674076

40684077
<td>no
40694078

4070-
<td>as specified, with lengths made absolute
4071-
40724079
<td>relative to the flex container's inner main size
40734080

4081+
<td>visual
4082+
40744083
<tr>
40754084
<th><a class=property href="#flex-direction">flex-direction</a>
40764085

@@ -4082,7 +4091,7 @@ <h2 class=no-num id=property>Property index</h2>
40824091

40834092
<td>no
40844093

4085-
<td>specified value
4094+
<td>
40864095

40874096
<td>visual
40884097

@@ -4097,7 +4106,7 @@ <h2 class=no-num id=property>Property index</h2>
40974106

40984107
<td>see individual properties
40994108

4100-
<td>see individual properties
4109+
<td>
41014110

41024111
<td>visual
41034112

@@ -4112,7 +4121,7 @@ <h2 class=no-num id=property>Property index</h2>
41124121

41134122
<td>no
41144123

4115-
<td>specified value
4124+
<td>
41164125

41174126
<td>visual
41184127

@@ -4127,7 +4136,23 @@ <h2 class=no-num id=property>Property index</h2>
41274136

41284137
<td>no
41294138

4130-
<td>specified value
4139+
<td>
4140+
4141+
<td>visual
4142+
4143+
<tr>
4144+
<th><a class=property href="#flex">flex</a>
4145+
4146+
<td>none | [ &lt;&apos;flex-grow&apos;> &lt;&apos;flex-shrink&apos;>? ||
4147+
&lt;&apos;flex-basis&apos;> ]
4148+
4149+
<td>see individual properties
4150+
4151+
<td>flex items
4152+
4153+
<td>see individual properties
4154+
4155+
<td>
41314156

41324157
<td>visual
41334158

@@ -4142,7 +4167,7 @@ <h2 class=no-num id=property>Property index</h2>
41424167

41434168
<td>no
41444169

4145-
<td>specified value
4170+
<td>
41464171

41474172
<td>visual
41484173

@@ -4157,19 +4182,25 @@ <h2 class=no-num id=property>Property index</h2>
41574182

41584183
<td>no
41594184

4160-
<td>specified value
4185+
<td>
41614186

41624187
<td>visual
41634188

41644189
<tr>
41654190
<th><span class=property>min-width</span>, <span
41664191
class=property>min-height</span>
41674192

4168-
<td>auto
4193+
<td>
41694194

4170-
<td>auto
4195+
<td>
41714196

4172-
<td>the percentage as specified or the absolute length or a keyword
4197+
<td>
4198+
4199+
<td>
4200+
4201+
<td>
4202+
4203+
<td>
41734204

41744205
<tr>
41754206
<th><a class=property href="#order">order</a>
@@ -4182,7 +4213,7 @@ <h2 class=no-num id=property>Property index</h2>
41824213

41834214
<td>no
41844215

4185-
<td>specified value
4216+
<td>
41864217

41874218
<td>visual
41884219
</table>

css3-flexbox/Overview.src.html

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ <h3 id="overview">
305305
can be laid out in any <a href="#flex-direction-property">flow direction</a>
306306
(leftwards, rightwards, downwards, or even upwards!)
307307
<li>
308-
can have their visual order <a href="#flex-flow-row-reverse">reversed</a> or
308+
can have their display order <a href="#flex-flow-row-reverse">reversed</a> or
309309
<a href="#order-property">rearranged</a> at the style layer
310-
(i.e., display order can be independent of source order)
310+
(i.e., visual order can be independent of source and speech order)
311311
<li>
312312
can be laid out linearly along a single (<i title="main axis">main</i>) axis or
313313
<a href="#flex-wrap-property">wrapped</a> into multiple lines along a secondary (<i title="cross axis">cross</i>) axis
@@ -326,28 +326,28 @@ <h3 id="overview">
326326
Here's an example of a catalog where each item has a title, an photo, a description, and a purchase button.
327327
The designer's intention is that each entry has the same overall size,
328328
that the photo be above the text,
329-
and the purchase buttons aligned at the bottom, regardless of the length of the item's description.
329+
and that the purchase buttons aligned at the bottom, regardless of the length of the item's description.
330330
Flex layout makes many aspects of this design easy:
331331

332332
<ul>
333333
<li>
334-
The catalog uses flex layout to lay out a row of items horizontally,
335-
and to ensure they're all equal-height.
334+
The catalog uses flex layout to lay out rows of items horizontally,
335+
and to ensure that items within a row are all equal-height.
336336
Each entry is then itself a column flex container,
337337
laying out its contents vertically.
338338

339339
<li>
340-
Within each entry, content is ordered logically with the title first,
341-
followed by the description and the photo.
340+
Within each entry, the source document content is ordered logically
341+
with the title first, followed by the description and the photo.
342342
This provides a sensible ordering for speech rendering and in non-CSS browsers.
343343
For a more compelling visual presentation, however,
344344
'order' is used to pull the image up from later in the content to the top,
345-
and 'align-self' to center it horizontally.
345+
and 'align-self' is used to center it horizontally.
346346

347347
<li>
348348
An <a href="#auto-margins">''auto'' margin</a> above the purchase button
349-
forces it to the bottom of the entry box,
350-
regardless of the height of the description.
349+
forces it to the bottom within each entry box,
350+
regardless of the height of that item's description.
351351
</ul>
352352

353353
<pre>
@@ -940,6 +940,21 @@ <h2>
940940
such as hacks using the 'float' and 'clear' properties.
941941
This functionality is exposed through the 'flex-direction', 'flex-wrap', and 'order' properties.
942942

943+
<p class="note">
944+
The reordering capabilities of flex layout intentionally affect
945+
<em>only the visual rendering</em>,
946+
leaving speech order and navigation based on the source order.
947+
This allows authors to manipulate the visual presentation
948+
while leaving the source order intact for non-CSS UAs and for
949+
linear models such as speech and sequential navigation.
950+
See <a href="#order-accessibility">Reordering and Accessibility</a>
951+
and the <a href="#overview">Flex Layout Overview</a> for examples
952+
that use this dichotomy to improve accessibility.
953+
954+
<p>
955+
Authors <em>must not</em> use these techniques as a substitute for correct source ordering,
956+
as that can ruin the accessibility of the document.
957+
943958
<h3 id='flex-direction-property'>
944959
Flex Flow Direction: the 'flex-direction' property</h3>
945960

@@ -1235,18 +1250,20 @@ <h3 id='order-property'>
12351250
<h4 id="order-accessibility">Reordering and Accessibility</h4>
12361251

12371252
<p>
1238-
The 'order' property <em>must not</em> affect ordering in non-visual media
1253+
The 'order' property <em>does not</em> affect ordering in non-visual media
12391254
(such as <a href="http://www.w3.org/TR/css3-speech/">speech</a>).
1240-
Similarly, 'order' does not affect
1255+
Likewise, 'order' does not affect
12411256
the default traversal order of sequential navigation modes
12421257
(such as cycling through links, see e.g. 'nav-index' [[CSS3UI]] or <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#sequential-focus-navigation-and-the-tabindex-attribute"><code>tabindex</code></a> [[HTML40]]).
12431258
Authors <em>must</em> use 'order' only for visual, not logical, reordering of content;
12441259
style sheets that use 'order' to perform logical reordering are non-conforming.
12451260
<p class='note'>
1246-
This is so non-visual media and non-CSS UAs,
1261+
This is so that non-visual media and non-CSS UAs,
12471262
which typically present content linearly,
1248-
can be catered to with a logical source order,
1249-
while 'order' is used to rearrange the visual order.
1263+
can rely on a logical source order,
1264+
while 'order' is used to tailor the visual order.
1265+
(Since visual perception is two-dimensional and non-linear,
1266+
the desired visual order is not always logical.)
12501267

12511268
<div class='example'>
12521269
<p>

0 commit comments

Comments
 (0)