Skip to content

Commit 87a9bdf

Browse files
committed
[css-ruby] HTML wants ruby elements outside <ruby> to not be styled. <https://lists.w3.org/Archives/Public/www-style/2015Feb/0450.html>
1 parent 0880aae commit 87a9bdf

2 files changed

Lines changed: 44 additions & 32 deletions

File tree

css-ruby/Overview.bs

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,20 +1522,27 @@ Appendix A: Default Style Sheet</h2>
15221522
for rendering HTML and XHTML ruby markup as ruby layout:
15231523

15241524
<pre>
1525-
<!-- -->ruby { display: ruby; }
1526-
<!-- -->rb { display: ruby-base; white-space: nowrap; }
1527-
<!-- -->rp { display: none; }
1528-
<!-- -->rt { display: ruby-text; }
1529-
<!-- -->rbc { display: ruby-base-container; }
1530-
<!-- -->rtc { display: ruby-text-container; }
1531-
<!-- -->rtc, rt { white-space: nowrap; font-size: 50%; line-height: 1; }
1532-
<!-- -->rtc:lang(zh-TW), rt:lang(zh-TW) { font-size: 30%; } /* bopomofo */
1533-
<!-- -->rtc > rt { font-size: inherit; }
1534-
<!-- -->rtc:lang(zh), rt:lang(zh) { ruby-align: center; }
1535-
<!-- -->ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }</pre>
1536-
1537-
<p>Additional rules for UAs supporting the relevant features of [[CSS3-TEXT-DECOR]] and [[CSS3-FONTS]]:
1538-
<pre>rtc, rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre>
1525+
ruby { display: ruby; }
1526+
ruby > rp { display: none; }
1527+
ruby > rbc { display: ruby-base-container; }
1528+
ruby > rtc { display: ruby-text-container; }
1529+
ruby > rb, rbc > rb { display: ruby-base; white-space: nowrap; }
1530+
ruby > rt, rtc > rt { display: ruby-text; }
1531+
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
1532+
1533+
1534+
rtc:lang(zh), rt:lang(zh) {
1535+
ruby-align: center; }
1536+
ruby > rtc, ruby > rt, rtc > rt {
1537+
font-variant-east-asian: ruby; /* See [[CSS3-FONTS]] */
1538+
text-emphasis: none; /* See [[CSS3-TEXT-DECOR]] */
1539+
white-space: nowrap;
1540+
line-height: 1;
1541+
font-size: 50%; }
1542+
rtc:lang(zh-TW), rt:lang(zh-TW) {
1543+
font-size: 25%; } /* bopomofo */
1544+
rtc > rt {
1545+
font-size: inherit; }</pre>
15391546

15401547
<p class="note">Authors should not use the above rules:
15411548
a UA that supports ruby layout should provide these by default.
@@ -1632,6 +1639,7 @@ Acknowledgments</h2>
16321639
Masayasu Ishikawa (<span lang="ja">石川雅康</span>),
16331640
Taichi Kawabata,
16341641
Chris Pratley,
1642+
Xidorn Quan,
16351643
Takao Suzuki (<span lang="ja">鈴木 孝雄</span>),
16361644
Frank Yung-Fong Tang,
16371645
Chris Thrasher,

css-ruby/Overview.html

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<h1 class="p-name no-ref" id="title">CSS Ruby Layout Module Level 1</h1>
7575

7676
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft,
77-
<time class="dt-updated" datetime="2015-02-07">7 February 2015</time></span></h2>
77+
<time class="dt-updated" datetime="2015-02-23">23 February 2015</time></span></h2>
7878

7979
<div data-fill-with="spec-metadata">
8080
<dl>
@@ -2182,22 +2182,27 @@ <h3 class="no-num heading settled" id="default-ua-ruby"><span class="content">
21822182
for rendering HTML and XHTML ruby markup as ruby layout:
21832183

21842184
</p>
2185-
<pre>ruby { display: ruby; }
2186-
rb { display: ruby-base; white-space: nowrap; }
2187-
rp { display: none; }
2188-
rt { display: ruby-text; }
2189-
rbc { display: ruby-base-container; }
2190-
rtc { display: ruby-text-container; }
2191-
rtc, rt { white-space: nowrap; font-size: 50%; line-height: 1; }
2192-
rtc:lang(zh-TW), rt:lang(zh-TW) { font-size: 30%; } /* bopomofo */
2193-
rtc > rt { font-size: inherit; }
2194-
rtc:lang(zh), rt:lang(zh) { ruby-align: center; }
2195-
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }</pre>
2185+
<pre>ruby { display: ruby; }
2186+
ruby > rp { display: none; }
2187+
ruby > rbc { display: ruby-base-container; }
2188+
ruby > rtc { display: ruby-text-container; }
2189+
ruby > rb, rbc > rb { display: ruby-base; white-space: nowrap; }
2190+
ruby > rt, rtc > rt { display: ruby-text; }
2191+
ruby, rb, rt, rbc, rtc { unicode-bidi: isolate; }
21962192

2197-
2198-
<p>Additional rules for UAs supporting the relevant features of <a data-link-type="biblio" href="#biblio-css3-text-decor">[CSS3-TEXT-DECOR]</a> and <a data-link-type="biblio" href="#biblio-css3-fonts">[CSS3-FONTS]</a>:
2199-
</p>
2200-
<pre>rtc, rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre>
2193+
2194+
rtc:lang(zh), rt:lang(zh) {
2195+
ruby-align: center; }
2196+
ruby > rtc, ruby > rt, rtc > rt {
2197+
font-variant-east-asian: ruby; /* See [[CSS3-FONTS]] */
2198+
text-emphasis: none; /* See [[CSS3-TEXT-DECOR]] */
2199+
white-space: nowrap;
2200+
line-height: 1;
2201+
font-size: 50%; }
2202+
rtc:lang(zh-TW), rt:lang(zh-TW) {
2203+
font-size: 25%; } /* bopomofo */
2204+
rtc > rt {
2205+
font-size: inherit; }</pre>
22012206

22022207

22032208
<p class="note" role="note">Authors should not use the above rules:
@@ -2316,6 +2321,7 @@ <h2 class="no-num heading settled" id="acknowledgments"><span class="content">
23162321
Masayasu Ishikawa (<span lang="ja">石川雅康</span>),
23172322
Taichi Kawabata,
23182323
Chris Pratley,
2324+
Xidorn Quan,
23192325
Takao Suzuki (<span lang="ja">鈴木 孝雄</span>),
23202326
Frank Yung-Fong Tang,
23212327
Chris Thrasher,
@@ -2535,8 +2541,6 @@ <h3 class="no-num heading settled" id="informative"><span class="content">Inform
25352541
<dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a href="http://www.w3.org/TR/2013/CR-css3-values-20130730/">CSS Values and Units Module Level 3</a>. 30 July 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a href="http://www.w3.org/TR/2013/CR-css3-values-20130730/">http://www.w3.org/TR/2013/CR-css3-values-20130730/</a>
25362542
<dt id="biblio-jis4051"><a class="self-link" href="#biblio-jis4051"></a>[JIS4051]
25372543
<dd>???. Formatting rules for Japanese documents (『日本語文書の組版方法』). 2004. In Japanese
2538-
<dt id="biblio-css3-fonts"><a class="self-link" href="#biblio-css3-fonts"></a>[css3-fonts]
2539-
<dd>John Daggett. <a href="http://www.w3.org/TR/css3-fonts/">CSS Fonts Module Level 3</a>. 11 December 2012. WD. URL: <a href="http://www.w3.org/TR/css3-fonts/">http://www.w3.org/TR/css3-fonts/</a>
25402544
<dt id="biblio-jlreq"><a class="self-link" href="#biblio-jlreq"></a>[jlreq]
25412545
<dd>Yasuhiro Anan; et al. <a href="http://www.w3.org/TR/jlreq/">Requirements for Japanese Text Layout</a>. 3 April 2012. NOTE. URL: <a href="http://www.w3.org/TR/jlreq/">http://www.w3.org/TR/jlreq/</a>
25422546
<dt id="biblio-ruby"><a class="self-link" href="#biblio-ruby"></a>[ruby]

0 commit comments

Comments
 (0)