Skip to content

Commit 54837d4

Browse files
committed
Rewrite line-relative directions section. (Editorial.)
1 parent b4d3b9c commit 54837d4

3 files changed

Lines changed: 100 additions & 62 deletions

File tree

css3-writing-modes/Overview.html

Lines changed: 57 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,37 +2007,65 @@ <h3 id=logical-directions><span class=secno>6.2. </span> Flow-relative
20072007
<h3 id=line-directions><span class=secno>6.3. </span> Line-relative
20082008
Directions</h3>
20092009

2010-
<p>The <dfn id=line-relative-directions>line-relative directions</dfn> <a
2011-
href="#over"><i>over</i></a>, <a href="#under"><i>under</i></a>, <a
2012-
href="#line-left"><i>line-left</i></a>, and <a
2013-
href="#line-right"><i>line-right</i></a> are defined relative to the <dfn
2014-
id=line-orientation>line orientation</dfn>, which is given by a
2015-
combination of &lsquo;<a href="#text-orientation0"><code
2010+
<p>The <dfn id=line-orientation>line orientation</dfn> determines which
2011+
side of a line box is the logical “top” (ascender side). It is given
2012+
by a combination of &lsquo;<a href="#text-orientation0"><code
20162013
class=property>text-orientation</code></a>&rsquo; and &lsquo;<a
20172014
href="#writing-mode1"><code class=property>writing-mode</code></a>&rsquo;.
2018-
The <a href="#line-orientation"><i>line orientation</i></a> determines
2019-
which side of the line is the &ldquo;top&rdquo; and thus which sides are
2020-
<dfn id=under>under</dfn> (ascender side) and <dfn id=over>over</dfn>
2021-
(descender side) the line. The <i>line orientation<i> also affects the
2022-
interpretation of alignment (&lsquo;<code
2023-
class=property>vertical-align</code>&rsquo;) in the transverse dimension
2024-
of the line. </i></i>
2025-
2026-
<p>In addition to its <a href="#over"><i>over</i></a> and <a
2027-
href="#under"><i>under</i></a> sides, a line box, even a
2028-
vertically-oriented one, also has a "left" and "right" side, which we will
2029-
call the <a href="#line-left"><i>line-left</i></a> and <a
2030-
href="#line-right"><i>line-right</i></a> sides of the box (as distinct
2031-
from the physical left and physical right sides of the box). The <dfn
2032-
id=line-left>line-left</dfn> side of a box is nominally the side from
2033-
which <abbr title=left-to-right>LTR</abbr> text would start. The <dfn
2034-
id=line-right>line-right</dfn> side of a box is nominally the side from
2035-
which <abbr title=right-to-left>RTL</abbr> text would start. Depending on
2036-
the &lsquo;<a href="#writing-mode1"><code
2037-
class=property>writing-mode</code></a>&rsquo; and &lsquo;<a
2038-
href="#text-orientation0"><code
2039-
class=property>text-orientation</code></a>&rsquo; properties, the
2040-
line-left side of a box correspond to the physical left, top, or bottom.
2015+
Usually the line-relative “top” corresponds to the <a
2016+
href="#before"><i>before</i></a> side, but this is not always the case: in
2017+
Mongolian typesetting (and thus by default in &lsquo;<a
2018+
href="#vertical-lr"><code class=css>vertical-lr</code></a>&rsquo; writing
2019+
modes), the line-relative “top” corresponds to the <a
2020+
href="#after"><i>after</i></a> side. Hence the need for distinct
2021+
terminology.
2022+
2023+
<div class=figure> <img alt="Mongolian mixed with English"
2024+
src=mongolian-lr.jpg>
2025+
<p class=caption>A primarily Mongolian document, such as the one above, is
2026+
written in vertical lines stacking left to right, but lays its Latin text
2027+
with the tops of the glyphs towards the right. This makes the text run in
2028+
the same inline direction as Mongolian (top-to-bottom) and face the same
2029+
direction it does in other East Asian layouts (which have vertical lines
2030+
stacking right to left), but the glyphs' tops are facing the bottom of
2031+
the line stack rather than the top, which in an English paragraph would
2032+
be upside-down.
2033+
</div>
2034+
2035+
<p>In addition to a line-relative “top” and “bottom” to map things
2036+
like &lsquo;<code class=css>vertical-align: top</code>&rsquo;, CSS also
2037+
needs to refer to a line-relative “left” and “right” in order to
2038+
map things like &lsquo;<code class=css>text-align: left</code>&rsquo;.
2039+
Thus there are four <dfn id=line-relative-directions>line-relative
2040+
directions</dfn>, which are defined relative to the <a
2041+
href="#line-orientation"><i>line orientation</i></a> as follows:
2042+
2043+
<dl>
2044+
<dt><dfn id=over>over</dfn>
2045+
2046+
<dd>Nominally the side that corresponds to the ascender side or “top”
2047+
side of a line box. (The side overlines are typically drawn on.)
2048+
2049+
<dt><dfn id=under>under</dfn>
2050+
2051+
<dd>Opposite of <a href="#over"><i>over</i></a>: the line-relative
2052+
“bottom” or descender side. (The side underlines are typically drawn
2053+
on.)
2054+
2055+
<dt><dfn id=line-left>line-left</dfn>
2056+
2057+
<dd>Nominally the side from which <abbr title=left-to-right>LTR</abbr>
2058+
text would start.
2059+
2060+
<dt><dfn id=line-right>line-right</dfn>
2061+
2062+
<dd>Nominally the side from which <abbr title=right-to-left>RTL</abbr>
2063+
text would start. (Opposite of <a
2064+
href="#line-left"><i>line-left</i></a>.)
2065+
</dl>
2066+
2067+
<p>See the <a href=logical-to-physical>table below</a> for the exact
2068+
mappings between physical and line-relative directions.
20412069

20422070
<div class=figure> <a href="diagrams/line-orient-up.svg"
20432071
type="image/svg+xml"> <img alt="Line orientation compass" class=landscape
@@ -2061,14 +2089,6 @@ <h3 id=line-directions><span class=secno>6.3. </span> Line-relative
20612089
</div>
20622090
</div>
20632091

2064-
<p class=note>Note also that while the <a href="#over"><i>over</i></a> and
2065-
<a href="#under"><i>under</i></a> directions often map to the same
2066-
directions as <a href="#before">before</a> and <a href="#after">after</a>
2067-
respectively, this mapping is reversed for some combinations of &lsquo;<a
2068-
href="#writing-mode1"><code class=property>writing-mode</code></a>&rsquo;
2069-
and &lsquo;<a href="#text-orientation0"><code
2070-
class=property>text-orientation</code></a>&rsquo;.
2071-
20722092
<h3 id=logical-to-physical><span class=secno>6.4. </span>
20732093
Abstract-to-Physical Mappings</h3>
20742094

css3-writing-modes/Overview.src.html

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,26 +1441,49 @@ <h3 id="logical-directions">
14411441
<h3 id="line-directions">
14421442
Line-relative Directions</h3>
14431443

1444-
<p>The <dfn>line-relative directions</dfn> <i>over</i>, <i>under</i>,
1445-
<i>line-left</i>, and <i>line-right</i> are defined relative to the
1446-
<dfn>line orientation</dfn>, which is given by a combination of
1447-
'text-orientation' and 'writing-mode'. The <i>line orientation</i>
1448-
determines which side of the line is the &ldquo;top&rdquo; and
1449-
thus which sides are <dfn>under</dfn> (ascender side) and
1450-
<dfn>over</dfn> (descender side) the line. The <i>line orientation<i>
1451-
also affects the interpretation of alignment ('vertical-align') in the
1452-
transverse dimension of the line.
1453-
1454-
<p>In addition to its <i>over</i> and <i>under</i> sides, a line box, even
1455-
a vertically-oriented one, also has a "left" and "right" side, which we
1456-
will call the <i>line-left</i> and <i>line-right</i> sides of the box (as
1457-
distinct from the physical left and physical right sides of the box).
1458-
The <dfn>line-left</dfn> side of a box is nominally the side from which
1459-
<abbr title="left-to-right">LTR</abbr> text would start. The
1460-
<dfn>line-right</dfn> side of a box is nominally the side from which
1461-
<abbr title="right-to-left">RTL</abbr> text would start. Depending on the
1462-
'writing-mode' and 'text-orientation' properties, the line-left side of
1463-
a box correspond to the physical left, top, or bottom.
1444+
<p>The <dfn>line orientation</dfn> determines which side of a line
1445+
box is the logical “top” (ascender side). It is given by a combination
1446+
of 'text-orientation' and 'writing-mode'. Usually the line-relative “top”
1447+
corresponds to the <i>before</i> side, but this is not always the case:
1448+
in Mongolian typesetting (and thus by default in ''vertical-lr'' writing
1449+
modes), the line-relative “top” corresponds to the <i>after</i> side.
1450+
Hence the need for distinct terminology.
1451+
1452+
<div class="figure">
1453+
<img src="mongolian-lr.jpg" alt="Mongolian mixed with English">
1454+
<p class="caption">A primarily Mongolian document, such as the one above, is written in
1455+
vertical lines stacking left to right, but lays its Latin text with
1456+
the tops of the glyphs towards the right. This makes the text run in
1457+
the same inline direction as Mongolian (top-to-bottom) and face the
1458+
same direction it does in other East Asian layouts (which have vertical
1459+
lines stacking right to left), but the glyphs' tops are facing the
1460+
bottom of the line stack rather than the top, which in an English
1461+
paragraph would be upside-down.
1462+
</div>
1463+
1464+
<p>In addition to a line-relative “top” and “bottom” to map things like
1465+
'vertical-align: top', CSS also needs to refer to a line-relative
1466+
“left” and “right” in order to map things like ''text-align: left''.
1467+
Thus there are four <dfn>line-relative directions</dfn>, which are
1468+
defined relative to the <i>line orientation</i> as follows:
1469+
1470+
<dl>
1471+
<dt><dfn>over</dfn>
1472+
<dd>Nominally the side that corresponds to the ascender side or “top”
1473+
side of a line box. (The side overlines are typically drawn on.)
1474+
<dt><dfn>under</dfn>
1475+
<dd>Opposite of <i>over</i>: the line-relative “bottom” or descender side.
1476+
(The side underlines are typically drawn on.)
1477+
<dt><dfn>line-left</dfn>
1478+
<dd>Nominally the side from which <abbr title="left-to-right">LTR</abbr>
1479+
text would start.
1480+
<dt><dfn>line-right</dfn>
1481+
<dd>Nominally the side from which <abbr title="right-to-left">RTL</abbr>
1482+
text would start. (Opposite of <i>line-left</i>.)
1483+
</dl>
1484+
1485+
<p>See the <a href="logical-to-physical">table below</a> for the exact
1486+
mappings between physical and line-relative directions.
14641487

14651488
<div class="figure">
14661489
<a href="diagrams/line-orient-up.svg" type="image/svg+xml">
@@ -1485,11 +1508,6 @@ <h3 id="line-directions">
14851508
</div>
14861509
</div>
14871510

1488-
<p class="note">Note also that while the <i>over</i> and <i>under</i>
1489-
directions often map to the same directions as <a href="#before">before</a>
1490-
and <a href="#after">after</a> respectively, this mapping is reversed
1491-
for some combinations of 'writing-mode' and 'text-orientation'.
1492-
14931511
<h3 id="logical-to-physical">
14941512
Abstract-to-Physical Mappings</h3>
14951513

58.7 KB
Loading

0 commit comments

Comments
 (0)