Skip to content

Commit 29dd715

Browse files
committed
[css-ruby-1][editorial] Fixed Bikeshed issues
1 parent 92c1928 commit 29dd715

File tree

1 file changed

+62
-66
lines changed

1 file changed

+62
-66
lines changed

css-ruby-1/Overview.bs

Lines changed: 62 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,23 @@ Abstract: They are typically used in East Asian documents to indicate pronunciat
2222
Abstract: This module describes the rendering model and formatting controls related to displaying ruby annotations in CSS.
2323
</pre>
2424
<pre class=link-defaults>
25-
spec:css-text-3; type:dfn; text:character
2625
spec:css-box-4; type:dfn; text:content area
26+
spec:css-text-3; type:dfn; text:character
27+
spec:css-writing-modes-4; type:dfn; text:bidi isolation
28+
spec:html-ruby-extensions; type:element;
29+
text:rp
30+
text:rtc
31+
text:ruby
2732
</pre>
2833
<style>
29-
/* ASCII diagram colors */
30-
.base { color: blue; }
31-
.annot { color: red; }
32-
.column { color: gray; }
33-
.flagtxt1 { color: green; }
34-
.flagtxt2 { color: #ae4a00; }
35-
.flagbg1 { background: green; opacity: 0.3; }
36-
.flagbg2 { background: orange; opacity: 0.3; }
34+
/* ASCII diagram colors */
35+
.base { color: blue; }
36+
.annot { color: red; }
37+
.column { color: gray; }
38+
.flagtxt1 { color: green; }
39+
.flagtxt2 { color: #ae4a00; }
40+
.flagbg1 { background: green; opacity: 0.3; }
41+
.flagbg2 { background: orange; opacity: 0.3; }
3742
</style>
3843

3944
<h2 id="intro">
@@ -49,7 +54,7 @@ What is ruby?</h3>
4954
and serves as an annotation or a pronunciation guide associated with that run of text.
5055

5156
<figure>
52-
<img src="images/ruby-context.png"
57+
<img src="images/ruby-context.png" width="324" height="64"
5358
alt="Hiragana ruby annotations above each kanji in Japanese text">
5459
<figcaption>A run of Japanese text with phonetic ruby annotations indicating the pronunciation of each ideograph.</figcaption>
5560
</figure>
@@ -61,7 +66,7 @@ What is ruby?</h3>
6166
In this example, a single annotation is used to annotate a base text
6267
consisting of multiple characters.
6368
<div class="figure">
64-
<img src="images/licence.png"
69+
<img src="images/licence.png" width="260" height="66"
6570
alt="Example of ruby applied on top of a Japanese expression">
6671
<p class="caption">Example of ruby used in Japanese (simple case)
6772
</div>
@@ -78,7 +83,7 @@ What is ruby?</h3>
7883
the hiragana characters on top refer to the pronunciation of each of the base kanji characters,
7984
while the words “Keio” and “University” on the bottom are give the English translation.
8085
<div class="figure">
81-
<img src="images/ruby-univ.gif"
86+
<img src="images/ruby-univ.gif" width="277" height="108"
8287
alt="Example showing complex ruby with annotation text over and under the base characters">
8388
<p class="caption">Complex ruby with annotation text over and under the base characters
8489
</div>
@@ -174,7 +179,7 @@ Ruby Box Model</h2>
174179
and “[=columns=]” (each [=ruby base=] and its corresponding [=ruby annotations=]).
175180

176181
<figure>
177-
<img src="images/ruby-boxes-simple.png"
182+
<img src="images/ruby-boxes-simple.png" width="314" height="94"
178183
alt="Ruby structure arranged as a table,
179184
the first “column” containing 上 in a base box with じょう centered below in an annotation box
180185
and the second “column” containing 手 in a separate base box with ず centered below in another annotation box.">
@@ -185,7 +190,7 @@ Ruby Box Model</h2>
185190
Within a [=ruby segment=], a [=ruby annotation=] may span multiple [=ruby bases=].
186191

187192
<figure>
188-
<img src="images/ruby-boxes-complex.png"
193+
<img src="images/ruby-boxes-complex.png" width="350" height="128"
189194
alt="Ruby structure arranged as a table,
190195
the first “column” containing 旧 in a base box with jiù centered above in an annotation box,
191196
the second “column” containing 金 in a base box with jīn centered above in an annotation box,
@@ -653,7 +658,7 @@ Hiding Annotations: ''visibility: collapse'' and auto-hidden ruby</h3>
653658

654659
However, when displayed as ruby, the “り” should be hidden
655660
<div class="figure">
656-
<img src="images/furigana-separate.png"
661+
<img src="images/furigana-separate.png" width="160" height="73"
657662
alt="Hiragana annotations for 振り仮名 appear, each pronunciation above its kanji base character.">
658663
<p class="caption">Hiragana ruby for <span lang=ja>振り仮名</span>. Notice there is no hiragana annotation above <span lang=ja></span>, since it is already in hiragana.
659664
</div>
@@ -670,7 +675,7 @@ Hiding Annotations: ''visibility: collapse'' and auto-hidden ruby</h3>
670675
</xmp>
671676

672677
<figure>
673-
<img src="images/ruby-pairing-full.png" width=122
678+
<img src="images/ruby-pairing-full.png" width="122" height="55"
674679
alt="昆虫記, with phonetic annotations on all three characters.
675680
Because the middle annotation is wider than its base,
676681
space has been introduced around the base character
@@ -685,7 +690,7 @@ Hiding Annotations: ''visibility: collapse'' and auto-hidden ruby</h3>
685690
Applying ''visibility: collapse'' enables this hiding:
686691

687692
<figure>
688-
<img src="images/ruby-pairing-collapse.png" width=105
693+
<img src="images/ruby-pairing-collapse.png" width="105" height="53"
689694
alt="昆虫記, with phonetic annotations centered over
690695
the first and last characters.">
691696
<figcaption>Middle annotation as ''visibility: collapse''</figcaption>
@@ -697,7 +702,7 @@ Hiding Annotations: ''visibility: collapse'' and auto-hidden ruby</h3>
697702
but does not remove its impact on layout:
698703

699704
<figure>
700-
<img src="images/ruby-pairing-invisible.png" width=122
705+
<img src="images/ruby-pairing-invisible.png" width="122" height="55"
701706
alt="昆虫記, with phonetic annotations on the first and last characters.
702707
Over the second one, even though no annotation is showing,
703708
space is reserved as if to hold it,
@@ -711,7 +716,7 @@ Hiding Annotations: ''visibility: collapse'' and auto-hidden ruby</h3>
711716
disturbing the pairing of any annotations after it:
712717

713718
<figure>
714-
<img src="images/ruby-pairing-discard.png" width=107
719+
<img src="images/ruby-pairing-discard.png" width="107" height="55"
715720
alt="昆虫記, with mispaired phonetic annotations:
716721
the annotation for the second character having been removed,
717722
the annotation for the third character is displayed over the second one.">
@@ -1151,7 +1156,7 @@ Breaking Across Lines</h3>
11511156
even in the case of [=inter-character annotations=].
11521157

11531158
<div class="figure">
1154-
<img src="images/r-break-b.gif"
1159+
<img src="images/r-break-b.gif" width="300" height="90"
11551160
alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
11561161
<p class="caption">''inter-character'' ruby line breaking opportunity
11571162
</div>
@@ -1170,7 +1175,7 @@ Breaking Between Bases</h4>
11701175
and only if no [=ruby annotations=] span those [=ruby bases=].
11711176

11721177
<div class="figure">
1173-
<img src="images/r-break-a.gif"
1178+
<img src="images/r-break-a.gif" width="408" height="201"
11741179
alt="Diagram showing the line breaking opportunity in a complex ruby">
11751180
<p class="caption">Ruby line breaking opportunity
11761181
</div>
@@ -1243,7 +1248,7 @@ Bidi Reordering</h3>
12431248
To this end,
12441249
<ul>
12451250
<li>
1246-
Bidi isolation is forced on all [=internal ruby boxes=] and the [=ruby container=]:
1251+
[=Bidi isolation=] is forced on all [=internal ruby boxes=] and the [=ruby container=]:
12471252
the ''unicode-bidi/normal'' and ''embed'' values of 'unicode-bidi' compute to ''isolate'',
12481253
and ''bidi-override'' computes to ''isolate-override''.
12491254

@@ -1275,7 +1280,7 @@ Bidi Reordering</h3>
12751280

12761281
Note: It could be useful to adjust these rules slightly
12771282
so that when 'ruby-merge' is ''merge'' on a particular [=annotation container=],
1278-
bidi isolation is not forced onto the individual annotations,
1283+
[=bidi isolation=] is not forced onto the individual annotations,
12791284
enabling them to be processed together.
12801285
However, this would add complexity to implementations,
12811286
which does not seem justified in the absence of demand to handle this situation.
@@ -1325,7 +1330,7 @@ Line Spacing</h3>
13251330
taller than the paragraph's default font size.
13261331

13271332
<div class="figure">
1328-
<img src="images/rlh-a.gif"
1333+
<img src="images/rlh-a.gif" width="210" height="138"
13291334
alt="The content of each line sits in the middle of its line height;
13301335
the additional space on each side is called half-leading.
13311336
Ruby fits between lines if it is smaller than twice the half-leading,
@@ -1389,12 +1394,12 @@ Ruby Positioning: the 'ruby-position' property</h3>
13891394
The ruby annotation appears [=line-over=] the base.
13901395

13911396
<div class="figure">
1392-
<img src="images/shinkansen-top.gif"
1397+
<img src="images/shinkansen-top.gif" width="140" height="33"
13931398
alt="Diagram of ruby glyph layout in horizontal mode with ruby annotation appearing above the base">
13941399
<p class="caption">Ruby over Japanese base text in horizontal layout
13951400
</div>
13961401
<div class="figure">
1397-
<img src="images/shinkansen-right.gif" width="33"
1402+
<img src="images/shinkansen-right.gif" width="33" height="141"
13981403
alt="Diagram of ruby glyph layout in vertical mode with ruby annotation appearing vertically on the right of the base">
13991404
<p class="caption">Ruby to the right of Japanese base text in vertical layout
14001405
</div>
@@ -1407,12 +1412,12 @@ Ruby Positioning: the 'ruby-position' property</h3>
14071412
most easily found in educational text.
14081413

14091414
<div class="figure">
1410-
<img src="images/shinkansen-bottom.gif"
1415+
<img src="images/shinkansen-bottom.gif" width="142" height="36"
14111416
alt="Diagram of ruby glyph layout in horizontal mode with ruby annotation appearing below the base">
14121417
<p class="caption">Ruby under Japanese base text in horizontal layout
14131418
</div>
14141419
<div class="figure">
1415-
<img src="images/shinkansen-left.gif"
1420+
<img src="images/shinkansen-left.gif" width="37" height="141"
14161421
alt="Diagram of ruby glyph layout in vertical mode with ruby annotation appearing vertically on the left of the base">
14171422
<p class="caption">Ruby to the left of Japanese base text in vertical layout
14181423
</div>
@@ -1438,7 +1443,7 @@ Ruby Positioning: the 'ruby-position' property</h3>
14381443
even when the layout of the base characters is horizontal:
14391444

14401445
<div class="figure">
1441-
<img src="images/bopomofo.gif"
1446+
<img src="images/bopomofo.gif" width="138" height="42"
14421447
alt="Example of Taiwanese-style ruby">
14431448
<p class="caption">“Bopomofo” ruby in traditional Chinese
14441449
(ruby annotation shown in blue for clarity) in horizontal layout
@@ -1517,7 +1522,7 @@ Sharing Annotation Space: the 'ruby-merge' property</h3>
15171522
This style is called “mono ruby” in [[JLREQ]].
15181523

15191524
<figure>
1520-
<img src="images/ruby-mono.png"
1525+
<img src="images/ruby-mono.png" width="207" height="57"
15211526
alt="Extra space is added to base or annotations
15221527
when one of the pair is longer than the other
15231528
in order to keep each annotation exclusive to its own base.
@@ -1549,7 +1554,7 @@ Sharing Annotation Space: the 'ruby-merge' property</h3>
15491554
[=ruby annotations=] are kept together with their respective [=ruby bases=].
15501555

15511556
<figure>
1552-
<img src="images/ruby-merge.png"
1557+
<img src="images/ruby-merge.png" width="189" height="57"
15531558
alt="The combined annotation is centered with respect to the combined base,
15541559
even if this would place an annotation’s content over a different base.
15551560
In the case of “上手”, the “う” from the first base’s annotation
@@ -1580,7 +1585,7 @@ Sharing Annotation Space: the 'ruby-merge' property</h3>
15801585
to avoid imposing space between bases.
15811586

15821587
<figure>
1583-
<img src="images/ruby-jukugo.png"
1588+
<img src="images/ruby-jukugo.png" width="189" height="57"
15841589
alt="If there is enough space, annotations are aligned to their bases;
15851590
but if there is not, then annotations can share space with adjacent annotations.
15861591
Thus the annotations for “上手” share space over the second base as in the 'merge' case,
@@ -1643,11 +1648,10 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
16431648
<dd>
16441649
The ruby content is aligned with the start edge of its box.
16451650
<div class="figure">
1646-
<img width="145" height="91" src="images/ra-l.gif"
1647-
alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base" >
1648-
<img width="145" height="91"
1649-
alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base"
1650-
src="images/ra-l-rb.gif" >
1651+
<img src="images/ra-l.gif" width="145" height="91"
1652+
alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base">
1653+
<img src="images/ra-l-rb.gif" width="145" height="91"
1654+
alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base">
16511655
<p class="caption">''ruby-align/start'' ruby distribution
16521656
</div>
16531657

@@ -1670,12 +1674,10 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
16701674
<dt><dfn>center</dfn></dt>
16711675
<dd>The ruby content is centered within its box.
16721676
<div class="figure">
1673-
<img width="145" height="91"
1674-
alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base"
1675-
src="images/ra-c.gif" >
1676-
<img width="145" height="91"
1677-
alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base"
1678-
src="images/ra-c-rb.gif" >
1677+
<img src="images/ra-c.gif" width="145" height="91"
1678+
alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base">
1679+
<img src="images/ra-c-rb.gif" width="145" height="91"
1680+
alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base">
16791681
<p class="caption">''ruby-align/center'' ruby distribution
16801682
</div>
16811683
</dd>
@@ -1687,12 +1689,10 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
16871689
except that if there are no [=justification opportunities=]
16881690
the content is centered.
16891691
<div class="figure">
1690-
<img width="145" height="91"
1691-
alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base"
1692-
src="images/ra-dl.gif" >
1693-
<img width="145" height="91"
1694-
alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base"
1695-
src="images/ra-dl-rb.gif" >
1692+
<img src="images/ra-dl.gif" width="145" height="91"
1693+
alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base">
1694+
<img src="images/ra-dl-rb.gif" width="145" height="91"
1695+
alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base">
16961696
<p class="caption">''ruby-align/space-between'' ruby distribution
16971697
</div>
16981698
</dd>
@@ -1704,12 +1704,10 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
17041704
whose space is distributed half before and half after the ruby content.
17051705

17061706
<div class="figure">
1707-
<img width="145" height="91"
1708-
alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base"
1709-
src="images/ra-ds.gif" >
1710-
<img width="145" height="91"
1711-
alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base"
1712-
src="images/ra-ds-rb.gif" >
1707+
<img src="images/ra-ds.gif" width="145" height="91"
1708+
alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base">
1709+
<img src="images/ra-ds-rb.gif" width="145" height="91"
1710+
alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base">
17131711
<p class="caption">''ruby-align/space-around'' ruby distribution
17141712
</div>
17151713
</dd>
@@ -1756,12 +1754,10 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
17561754
Thus, the ''space-around'' and ''space-between'' values
17571755
will nevertheless result in Latin or Bopomofo characters centered:
17581756
<div class="figure">
1759-
<img width="145" height="91"
1760-
alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base"
1761-
src="images/ra-c-h.gif" >
1762-
<img width="145" height="91"
1763-
alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base"
1764-
src="images/ra-c-rb-h.gif" >
1757+
<img src="images/ra-c-h.gif" width="145" height="91"
1758+
alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base">
1759+
<img src="images/ra-c-rb-h.gif" width="145" height="91"
1760+
alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base">
17651761
<p class="caption">Non-CJK ruby text in ''ruby-align/space-around'' and ''ruby-align/space-between'' ruby distribution are centered
17661762
</div>
17671763

@@ -1860,7 +1856,7 @@ Overhanging Ruby: the 'ruby-overhang' property</h3>
18601856
and adjacent elements do not cross the box boundary:
18611857

18621858
<div class="figure">
1863-
<img src="images/ro-n.gif"
1859+
<img src="images/ro-n.gif" width="220" height="91"
18641860
alt="Diagram showing the ruby boxes interacting with adjacent text">
18651861
<p class="caption">Simple ruby whose text is not allowed to overhang adjacent text
18661862
</div>
@@ -1876,7 +1872,7 @@ Overhanging Ruby: the 'ruby-overhang' property</h3>
18761872
or its overlapped [=base=]’s contents.
18771873

18781874
<div class="figure">
1879-
<img src="images/ro-a.gif"
1875+
<img src="images/ro-a.gif" width="177" height="91"
18801876
alt="Diagram showing the ruby boxes interacting with adjacent text">
18811877
<p class="caption">Simple ruby whose text is allowed to overhang adjacent text
18821878
</div>
@@ -1916,9 +1912,9 @@ Line-edge Alignment</h3>
19161912
This level of the specification does not provide a mechanism to control this behavior.
19171913

19181914
<div class="figure">
1919-
<img src="images/ra-le-l.gif"
1915+
<img src="images/ra-le-l.gif" width="146" height="109"
19201916
alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base" >
1921-
<img src="images/ra-le-r.gif"
1917+
<img src="images/ra-le-r.gif" width="146" height="110"
19221918
alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base" >
19231919
<p class="caption">Line-edge alignment
19241920
</div>
@@ -2163,7 +2159,7 @@ Glossary</h2>
21632159
These are often, but not exclusively, used for ruby annotations.
21642160

21652161
<div class="figure">
2166-
<img src="images/zhuyin-example.png"
2162+
<img src="images/zhuyin-example.png" width="349" height="132"
21672163
alt="Bopomofo characters (in blue) run vertically along the right side of each Hanzi character in the horizontal text.">
21682164
<p class="caption">Example of Bopomofo used as phonetic inter-character annotations in Chinese
21692165
</div>

0 commit comments

Comments
 (0)