Skip to content

Commit 80ee9ef

Browse files
committed
Add jdaggett's vertical text intro and clarification to direction mapping in 4.1
1 parent d5699c4 commit 80ee9ef

6 files changed

Lines changed: 186 additions & 21 deletions

File tree

css3-writing-modes/Overview.html

Lines changed: 104 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
.figurepair { display: table; margin: 1em auto; }
1717
.figurepair .figure { display: table-cell; }
1818
h2, .example { clear: both; }
19+
img, object { max-width: 100%; }
1920
</style>
2021
<link href="http://www.w3.org/StyleSheets/tr/W3C-ED.css" rel=stylesheet
2122
type="text/css">
@@ -27,7 +28,7 @@
2728

2829
<h1>CSS Writing Modes Module Level 3</h1>
2930

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
3132
2010</h2>
3233

3334
<dl>
@@ -132,6 +133,10 @@ <h2 class="no-num no-toc" id=Contents>Contents</h2>
132133

133134
<ul class=toc>
134135
<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>
135140

136141
<li><a href="#text-flow"><span class=secno>2. </span>Writing Modes and
137142
Terminology</a>
@@ -228,6 +233,77 @@ <h2 id=intro><span class=secno>1. </span>Introduction</h2>
228233
href="#UTN22" rel=biblioentry>[UTN22]<!--{{UTN22}}--></a> for an
229234
explanation of relevant issues.
230235

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 &ldquo;for Mac 2011&rdquo;, 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+
231307
<h2 id=text-flow><span class=secno>2. </span>Writing Modes and Terminology</h2>
232308

233309
<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
9741050
to the horizontal dimension in vertical writing modes. Thus:
9751051

9761052
<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 &lsquo;<code
981-
class=css>*-left</code>&rsquo; and &lsquo;<code
982-
class=css>*-right</code>&rsquo; box properties (border, margin, padding)
983-
use &lsquo;<code class=css>*-top</code>&rsquo; and &lsquo;<code
984-
class=css>*-bottom</code>&rsquo; instead, and vice versa.
985-
986-
<li>Layout rules that depend on the &lsquo;<a href="#direction0"><code
987-
class=property>direction</code></a>&rsquo; property to choose between
988-
left and right (e.g. overflow, overconstraint resolution, the initial
989-
value for &lsquo;<code class=property>text-align</code>&rsquo;, 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 &lsquo;<code
1059+
class=css>*-left</code>&rsquo; and &lsquo;<code
1060+
class=css>*-right</code>&rsquo; box properties (border, margin, padding)
1061+
use &lsquo;<code class=css>*-top</code>&rsquo; and &lsquo;<code
1062+
class=css>*-bottom</code>&rsquo; 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 &lsquo;<code class=property>margin-left</code>&rsquo;
1067+
property still affects the lefthand margin, for example; however in a
1068+
&lsquo;<code class=css>vertical-rl</code>&rsquo; writing mode it takes
1069+
part in margin collapsing in place of &lsquo;<code
1070+
class=property>margin-bottom</code>&rsquo;.</p>
1071+
1072+
<li>
1073+
<p>Layout rules that depend on the &lsquo;<a href="#direction0"><code
1074+
class=property>direction</code></a>&rsquo; property to choose between
1075+
left and right (e.g. overflow, overconstraint resolution, the initial
1076+
value for &lsquo;<code class=property>text-align</code>&rsquo;, table
1077+
column ordering) are abstracted to the <a href="#start">start</a> and <a
1078+
href="#end">end</a> sides and applied appropriately.
9921079
</ul>
9931080

9941081
<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
19682055

19692056
<h2 class=no-num id=acknowledgements>Acknowledgements</h2>
19702057

1971-
<p>Martin Heijdra, Paul Nelson, Michel Suignard, Steve Zilles
2058+
<p>John Daggett, Martin Heijdra, Paul Nelson, Michel Suignard, Steve Zilles
19722059

19732060
<h2 class=no-num id=bidi-html>Appendix B: Bidi Rules for HTML</h2>
19742061

css3-writing-modes/Overview.src.html

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.figurepair { display: table; margin: 1em auto; }
1515
.figurepair .figure { display: table-cell; }
1616
h2, .example { clear: both; }
17+
img, object { max-width: 100%; }
1718
</style>
1819
<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/tr/W3C-ED.css">
1920
</head>
@@ -75,6 +76,77 @@ <h2 id="intro">Introduction</h2>
7576
<p>Inherently bottom-to-top scripts are not handled in this version. See
7677
[[UTN22]] for an explanation of relevant issues.</p>
7778

79+
<h3 id="vertical-intro">Introduction to Vertical Text</h3>
80+
81+
<p>In addition to extensions to CSS2.1's support for bidirectional text,
82+
this module introduces the rules and properties needed to support vertical
83+
text layout in CSS.
84+
85+
<p>Unlike languages that use the Latin script which are primarily laid out
86+
horizontally, Asian languages such as Chinese and Japanese can be laid
87+
vertically. The Japanese example below shows the same text laid out
88+
horizontally and vertically. In the horizontal case, text is read
89+
from left to right, top to bottom. For the vertical case, the text is
90+
read top to bottom, with the lines ordered either right to left (for
91+
Chinese and Japanese) or left to right (for Mongolian and Manchu).
92+
Indentation from the left edge in the left-to-right horizontal case
93+
translates to indentation from the top edge in the top-to-bottom vertical
94+
case.
95+
96+
<p>The change from horizontal to vertical writing can affect not just the
97+
layout, but also the typesetting. For example, the position of punctuation
98+
mark within its spacing box box also changes from the horizontal to the
99+
vertical case:
100+
101+
<div class="figure">
102+
<p><img src="vert-horiz-comparison.png"
103+
alt="A comparison of horizontal and vertical Japanese shows that
104+
although the lines rotate, the characters remain upright.
105+
The period mark shifts from the bottom left of its glyph
106+
box to the top right. The running headers, however, remain
107+
laid out horizontally across the top of the page."/></p>
108+
<p class="caption">iBunko application (iOS)</p>
109+
</div>
110+
111+
<p>Vertical text that includes Latin script text or text from other scripts
112+
normally displayed horizontally can display that text in a number of
113+
ways. In the example below, the word "Virus" is shown rotated inline
114+
while the acronyms "DNA" and "RNA" are stacked upright:
115+
116+
<div class="figure">
117+
<p><img src="vert-latin-layouts.png"
118+
alt="This screenshot of an electronic dictionary illustrates
119+
the DNA/RNA/virus example."/></p>
120+
<p class="caption">Daijirin Viewer 1.4 (iOS)</p>
121+
</div>
122+
123+
<p>In some special cases such as two-digit numbers in dates, text is fit
124+
compactly into a single vertical character box:
125+
126+
<div class="figure">
127+
<p><img src="vert-number-layouts.png"
128+
alt="An exerpt from MacFan shows several possible vertical layouts
129+
for numbers: the two-digit month and day are written as
130+
horizontal-in-vertical blocks; the years are written with
131+
each character upright; except in the English phrase
132+
&ldquo;for Mac 2011&rdquo;, where the date is rotated to
133+
match the rotated Latin."/></p>
134+
<p class="caption">MacFan, December 2010, p.49</p>
135+
</div>
136+
137+
<p>Layouts often involve a mixture of vertical and horizontal elements:
138+
139+
<div class="figure">
140+
<p><img src="vert-horiz-combination.png"
141+
alt="Magazines often mix horizontal and vertical layout; for
142+
example, using one orientation for the main article text
143+
and a different one for sidebar or illustrative content."/></p>
144+
<p class="caption">AERA, 7 June 2010, p.26</p>
145+
</div>
146+
147+
<p>Vertical text layouts also need to handle bidirectional text layout;
148+
clockwise-rotated Arabic, for example, is laid out bottom-to-top.
149+
78150
<h2 id="text-flow">Writing Modes and Terminology</h2>
79151

80152
<p>A <dfn>writing mode</dfn> in CSS is determined by the 'writing-mode',
@@ -680,12 +752,18 @@ <h3 id="vertical-layout">Box Layout in Vertical Writing Modes</h3>
680752
instead apply to the horizontal dimension in vertical writing modes.
681753
Thus:
682754
<ul>
683-
<li>Layout rules that refer to the width use the height instead,
755+
<li><p>Layout rules that refer to the width use the height instead,
684756
and vice versa.
685-
<li>Layout rules that refer to the '*-left' and '*-right' box
757+
<li><p>Layout rules that refer to the '*-left' and '*-right' box
686758
properties (border, margin, padding) use '*-top' and '*-bottom'
687759
instead, and vice versa.
688-
<li>Layout rules that depend on the 'direction' property to choose between
760+
<p class="note">Which side of the
761+
box the property applies to doesn't change: only which values
762+
are inputs to which layout calculations changes. The 'margin-left'
763+
property still affects the lefthand margin, for example; however
764+
in a ''vertical-rl'' writing mode it takes part in margin collapsing
765+
in place of 'margin-bottom'.</p>
766+
<li><p>Layout rules that depend on the 'direction' property to choose between
689767
left and right (e.g. overflow, overconstraint resolution, the initial
690768
value for 'text-align', table column ordering)
691769
are abstracted to the <a href="#start">start</a> and
@@ -1450,7 +1528,7 @@ <h2 id="text-combine">Glyph Composition: the 'text-combine' property</h2>
14501528

14511529
<h2 class="no-num" id="acknowledgements">Acknowledgements</h2>
14521530

1453-
<p>Martin Heijdra, Paul Nelson, Michel Suignard, Steve Zilles</p>
1531+
<p>John Daggett, Martin Heijdra, Paul Nelson, Michel Suignard, Steve Zilles</p>
14541532

14551533
<h2 id="bidi-html" class=no-num>Appendix B: Bidi Rules for HTML</h2>
14561534

427 KB
Loading
203 KB
Loading
141 KB
Loading
139 KB
Loading

0 commit comments

Comments
 (0)