You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-flexbox/Overview.src.html
+32-15Lines changed: 32 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -305,9 +305,9 @@ <h3 id="overview">
305
305
can be laid out in any <ahref="#flex-direction-property">flow direction</a>
306
306
(leftwards, rightwards, downwards, or even upwards!)
307
307
<li>
308
-
can have their visual order <ahref="#flex-flow-row-reverse">reversed</a> or
308
+
can have their display order <ahref="#flex-flow-row-reverse">reversed</a> or
309
309
<ahref="#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)
311
311
<li>
312
312
can be laid out linearly along a single (<ititle="main axis">main</i>) axis or
313
313
<ahref="#flex-wrap-property">wrapped</a> into multiple lines along a secondary (<ititle="cross axis">cross</i>) axis
@@ -326,28 +326,28 @@ <h3 id="overview">
326
326
Here's an example of a catalog where each item has a title, an photo, a description, and a purchase button.
327
327
The designer's intention is that each entry has the same overall size,
328
328
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.
330
330
Flex layout makes many aspects of this design easy:
331
331
332
332
<ul>
333
333
<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.
336
336
Each entry is then itself a column flex container,
337
337
laying out its contents vertically.
338
338
339
339
<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.
342
342
This provides a sensible ordering for speech rendering and in non-CSS browsers.
343
343
For a more compelling visual presentation, however,
344
344
'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.
346
346
347
347
<li>
348
348
An <ahref="#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.
351
351
</ul>
352
352
353
353
<pre>
@@ -940,6 +940,21 @@ <h2>
940
940
such as hacks using the 'float' and 'clear' properties.
941
941
This functionality is exposed through the 'flex-direction', 'flex-wrap', and 'order' properties.
942
942
943
+
<pclass="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 <ahref="#order-accessibility">Reordering and Accessibility</a>
951
+
and the <ahref="#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
+
943
958
<h3id='flex-direction-property'>
944
959
Flex Flow Direction: the 'flex-direction' property</h3>
945
960
@@ -1235,18 +1250,20 @@ <h3 id='order-property'>
1235
1250
<h4id="order-accessibility">Reordering and Accessibility</h4>
1236
1251
1237
1252
<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
1239
1254
(such as <ahref="http://www.w3.org/TR/css3-speech/">speech</a>).
1240
-
Similarly, 'order' does not affect
1255
+
Likewise, 'order' does not affect
1241
1256
the default traversal order of sequential navigation modes
1242
1257
(such as cycling through links, see e.g. 'nav-index' [[CSS3UI]] or <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#sequential-focus-navigation-and-the-tabindex-attribute"><code>tabindex</code></a> [[HTML40]]).
1243
1258
Authors <em>must</em> use 'order' only for visual, not logical, reordering of content;
1244
1259
style sheets that use 'order' to perform logical reordering are non-conforming.
1245
1260
<pclass='note'>
1246
-
This is so non-visual media and non-CSS UAs,
1261
+
This is so that non-visual media and non-CSS UAs,
1247
1262
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,
0 commit comments