|
16 | 16 | .figurepair { display: table; margin: 1em auto; } |
17 | 17 | .figurepair .figure { display: table-cell; } |
18 | 18 | h2, .example { clear: both; } |
| 19 | + img, object { max-width: 100%; } |
19 | 20 | </style> |
20 | 21 | <link href="http://www.w3.org/StyleSheets/tr/W3C-ED.css" rel=stylesheet |
21 | 22 | type="text/css"> |
|
27 | 28 |
|
28 | 29 | <h1>CSS Writing Modes Module Level 3</h1> |
29 | 30 |
|
30 | | - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 21 November |
| 31 | + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 24 November |
31 | 32 | 2010</h2> |
32 | 33 |
|
33 | 34 | <dl> |
@@ -132,6 +133,10 @@ <h2 class="no-num no-toc" id=Contents>Contents</h2> |
132 | 133 |
|
133 | 134 | <ul class=toc> |
134 | 135 | <li><a href="#intro"><span class=secno>1. </span>Introduction</a> |
| 136 | + <ul class=toc> |
| 137 | + <li><a href="#vertical-intro"><span class=secno>1.1. </span>Introduction |
| 138 | + to Vertical Text</a> |
| 139 | + </ul> |
135 | 140 |
|
136 | 141 | <li><a href="#text-flow"><span class=secno>2. </span>Writing Modes and |
137 | 142 | Terminology</a> |
@@ -228,6 +233,77 @@ <h2 id=intro><span class=secno>1. </span>Introduction</h2> |
228 | 233 | href="#UTN22" rel=biblioentry>[UTN22]<!--{{UTN22}}--></a> for an |
229 | 234 | explanation of relevant issues. |
230 | 235 |
|
| 236 | + <h3 id=vertical-intro><span class=secno>1.1. </span>Introduction to |
| 237 | + Vertical Text</h3> |
| 238 | + |
| 239 | + <p>In addition to extensions to CSS2.1's support for bidirectional text, |
| 240 | + this module introduces the rules and properties needed to support vertical |
| 241 | + text layout in CSS. |
| 242 | + |
| 243 | + <p>Unlike languages that use the Latin script which are primarily laid out |
| 244 | + horizontally, Asian languages such as Chinese and Japanese can be laid |
| 245 | + vertically. The Japanese example below shows the same text laid out |
| 246 | + horizontally and vertically. In the horizontal case, text is read from |
| 247 | + left to right, top to bottom. For the vertical case, the text is read top |
| 248 | + to bottom, with the lines ordered either right to left (for Chinese and |
| 249 | + Japanese) or left to right (for Mongolian and Manchu). Indentation from |
| 250 | + the left edge in the left-to-right horizontal case translates to |
| 251 | + indentation from the top edge in the top-to-bottom vertical case. |
| 252 | + |
| 253 | + <p>The change from horizontal to vertical writing can affect not just the |
| 254 | + layout, but also the typesetting. For example, the position of punctuation |
| 255 | + mark within its spacing box box also changes from the horizontal to the |
| 256 | + vertical case: |
| 257 | + |
| 258 | + <div class=figure> |
| 259 | + <p><img alt="A comparison of horizontal and vertical Japanese shows that |
| 260 | + although the lines rotate, the characters remain upright. The period mark |
| 261 | + shifts from the bottom left of its glyph box to the top right. The |
| 262 | + running headers, however, remain laid out horizontally across the top of |
| 263 | + the page." src=vert-horiz-comparison.png></p> |
| 264 | + |
| 265 | + <p class=caption>iBunko application (iOS)</p> |
| 266 | + </div> |
| 267 | + |
| 268 | + <p>Vertical text that includes Latin script text or text from other scripts |
| 269 | + normally displayed horizontally can display that text in a number of ways. |
| 270 | + In the example below, the word "Virus" is shown rotated inline while the |
| 271 | + acronyms "DNA" and "RNA" are stacked upright: |
| 272 | + |
| 273 | + <div class=figure> |
| 274 | + <p><img alt="This screenshot of an electronic dictionary illustrates the |
| 275 | + DNA/RNA/virus example." src=vert-latin-layouts.png></p> |
| 276 | + |
| 277 | + <p class=caption>Daijirin Viewer 1.4 (iOS)</p> |
| 278 | + </div> |
| 279 | + |
| 280 | + <p>In some special cases such as two-digit numbers in dates, text is fit |
| 281 | + compactly into a single vertical character box: |
| 282 | + |
| 283 | + <div class=figure> |
| 284 | + <p><img alt="An exerpt from MacFan shows several possible vertical layouts |
| 285 | + for numbers: the two-digit month and day are written as |
| 286 | + horizontal-in-vertical blocks; the years are written with each character |
| 287 | + upright; except in the English phrase “for Mac 2011”, where |
| 288 | + the date is rotated to match the rotated Latin." |
| 289 | + src=vert-number-layouts.png></p> |
| 290 | + |
| 291 | + <p class=caption>MacFan, December 2010, p.49</p> |
| 292 | + </div> |
| 293 | + |
| 294 | + <p>Layouts often involve a mixture of vertical and horizontal elements: |
| 295 | + |
| 296 | + <div class=figure> |
| 297 | + <p><img alt="Magazines often mix horizontal and vertical layout; for |
| 298 | + example, using one orientation for the main article text and a different |
| 299 | + one for sidebar or illustrative content." src=vert-horiz-combination.png></p> |
| 300 | + |
| 301 | + <p class=caption>AERA, 7 June 2010, p.26</p> |
| 302 | + </div> |
| 303 | + |
| 304 | + <p>Vertical text layouts also need to handle bidirectional text layout; |
| 305 | + clockwise-rotated Arabic, for example, is laid out bottom-to-top. |
| 306 | + |
231 | 307 | <h2 id=text-flow><span class=secno>2. </span>Writing Modes and Terminology</h2> |
232 | 308 |
|
233 | 309 | <p>A <dfn id=writing-mode0>writing mode</dfn> in CSS is determined by the |
@@ -974,21 +1050,32 @@ <h3 id=vertical-layout><span class=secno>4.1. </span>Box Layout in Vertical |
974 | 1050 | to the horizontal dimension in vertical writing modes. Thus: |
975 | 1051 |
|
976 | 1052 | <ul> |
977 | | - <li>Layout rules that refer to the width use the height instead, and vice |
978 | | - versa. |
979 | | - |
980 | | - <li>Layout rules that refer to the ‘<code |
981 | | - class=css>*-left</code>’ and ‘<code |
982 | | - class=css>*-right</code>’ box properties (border, margin, padding) |
983 | | - use ‘<code class=css>*-top</code>’ and ‘<code |
984 | | - class=css>*-bottom</code>’ instead, and vice versa. |
985 | | - |
986 | | - <li>Layout rules that depend on the ‘<a href="#direction0"><code |
987 | | - class=property>direction</code></a>’ property to choose between |
988 | | - left and right (e.g. overflow, overconstraint resolution, the initial |
989 | | - value for ‘<code class=property>text-align</code>’, table |
990 | | - column ordering) are abstracted to the <a href="#start">start</a> and <a |
991 | | - href="#end">end</a> sides and applied appropriately. |
| 1053 | + <li> |
| 1054 | + <p>Layout rules that refer to the width use the height instead, and vice |
| 1055 | + versa. |
| 1056 | + |
| 1057 | + <li> |
| 1058 | + <p>Layout rules that refer to the ‘<code |
| 1059 | + class=css>*-left</code>’ and ‘<code |
| 1060 | + class=css>*-right</code>’ box properties (border, margin, padding) |
| 1061 | + use ‘<code class=css>*-top</code>’ and ‘<code |
| 1062 | + class=css>*-bottom</code>’ instead, and vice versa. |
| 1063 | + |
| 1064 | + <p class=note>Which side of the box the property applies to doesn't |
| 1065 | + change: only which values are inputs to which layout calculations |
| 1066 | + changes. The ‘<code class=property>margin-left</code>’ |
| 1067 | + property still affects the lefthand margin, for example; however in a |
| 1068 | + ‘<code class=css>vertical-rl</code>’ writing mode it takes |
| 1069 | + part in margin collapsing in place of ‘<code |
| 1070 | + class=property>margin-bottom</code>’.</p> |
| 1071 | + |
| 1072 | + <li> |
| 1073 | + <p>Layout rules that depend on the ‘<a href="#direction0"><code |
| 1074 | + class=property>direction</code></a>’ property to choose between |
| 1075 | + left and right (e.g. overflow, overconstraint resolution, the initial |
| 1076 | + value for ‘<code class=property>text-align</code>’, table |
| 1077 | + column ordering) are abstracted to the <a href="#start">start</a> and <a |
| 1078 | + href="#end">end</a> sides and applied appropriately. |
992 | 1079 | </ul> |
993 | 1080 |
|
994 | 1081 | <p>For features such as text alignment, floating, and list marker |
@@ -1968,7 +2055,7 @@ <h2 id=text-combine><span class=secno>7. </span>Glyph Composition: the |
1968 | 2055 |
|
1969 | 2056 | <h2 class=no-num id=acknowledgements>Acknowledgements</h2> |
1970 | 2057 |
|
1971 | | - <p>Martin Heijdra, Paul Nelson, Michel Suignard, Steve Zilles |
| 2058 | + <p>John Daggett, Martin Heijdra, Paul Nelson, Michel Suignard, Steve Zilles |
1972 | 2059 |
|
1973 | 2060 | <h2 class=no-num id=bidi-html>Appendix B: Bidi Rules for HTML</h2> |
1974 | 2061 |
|
|
0 commit comments