Tue, 18 Jun 2013 22:59:49 +0900
[css-ruby] Add default UA style sheet and other useful style sheets.
css-ruby/Overview.html | file | annotate | diff | comparison | revisions | |
css-ruby/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css-ruby/Overview.html Tue Jun 18 22:44:44 2013 +0900 1.2 +++ b/css-ruby/Overview.html Tue Jun 18 22:59:49 2013 +0900 1.3 @@ -206,25 +206,34 @@ 1.4 the ‘<code class=property>ruby-align</code>’ property</a> 1.5 </ul> 1.6 1.7 - <li><a href="#profiles"><span class=secno>4. </span> Profiles</a> 1.8 + <li class=no-num><a href="#default-stylesheet"> Appendix A: Default Style 1.9 + Sheet</a> 1.10 + <ul class=toc> 1.11 + <li class=no-num><a href="#default-ua-ruby"> Supporting Ruby Layout</a> 1.12 1.13 - <li><a href="#glossary"><span class=secno>5. </span> Glossary</a> 1.14 + <li class=no-num><a href="#default-inline"> Inlining Ruby 1.15 + Annotations</a> 1.16 1.17 - <li><a href="#conformance"><span class=secno>6. </span> Conformance</a> 1.18 + <li class=no-num><a href="#default-parens"> Generating Parentheses</a> 1.19 + </ul> 1.20 + 1.21 + <li><a href="#glossary"><span class=secno>4. </span> Glossary</a> 1.22 + 1.23 + <li><a href="#conformance"><span class=secno>5. </span> Conformance</a> 1.24 <ul class=toc> 1.25 - <li><a href="#conventions"><span class=secno>6.1. </span> Document 1.26 + <li><a href="#conventions"><span class=secno>5.1. </span> Document 1.27 conventions</a> 1.28 1.29 - <li><a href="#conformance-classes"><span class=secno>6.2. </span> 1.30 + <li><a href="#conformance-classes"><span class=secno>5.2. </span> 1.31 Conformance classes</a> 1.32 1.33 - <li><a href="#partial"><span class=secno>6.3. </span> Partial 1.34 + <li><a href="#partial"><span class=secno>5.3. </span> Partial 1.35 implementations</a> 1.36 1.37 - <li><a href="#experimental"><span class=secno>6.4. </span> Experimental 1.38 + <li><a href="#experimental"><span class=secno>5.4. </span> Experimental 1.39 implementations</a> 1.40 1.41 - <li><a href="#testing"><span class=secno>6.5. </span> Non-experimental 1.42 + <li><a href="#testing"><span class=secno>5.5. </span> Non-experimental 1.43 implementations</a> 1.44 </ul> 1.45 1.46 @@ -1312,34 +1321,69 @@ 1.47 <myrt rbspan="3">Expiration Date</myrt> 1.48 </myrtc> 1.49 </myruby></pre> 1.50 - 1.51 -<p class="issue"><span class="issuehead">Issue: </span> The i18n WG has requested the addition of a sample user agent default style sheet, as promised by Ruby Annotation section 3.4. See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=[CSS3+Ruby]%20Default+stylesheet&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&index-grp=Member__FULL+Public__FULL&index-type=t&type-index=public-i18n-core%40w3.org&resultsperpage=20&sortby=date">this thread</a>.</p> 1.52 --> 1.53 1.54 - <h2 id=profiles><span class=secno>4. </span> Profiles</h2> 1.55 + <h2 class=no-num id=default-stylesheet> Appendix A: Default Style Sheet</h2> 1.56 1.57 - <p>There are two modules defined by this module: 1.58 + <p><em>This section is informative.</em> 1.59 1.60 - <p>CSS3 Simple Ruby model 1.61 + <h3 class=no-num id=default-ua-ruby> Supporting Ruby Layout</h3> 1.62 1.63 - <p>CSS3 Complex Ruby model. 1.64 + <p>The following represents a default UA style sheet for rendering HTML 1.65 + and XHTML ruby markup as ruby layout: 1.66 1.67 - <p>They both contain all the properties specified by this CSS chapter, 1.68 - i.e. <a href="#rubyalign">‘<code 1.69 - class=property>ruby-align</code>’</a>, <a href="#rubyover">‘<code 1.70 - class=property>ruby-overhang</code>’</a>, <a href="#rubypos">‘<code 1.71 - class=property>ruby-position</code>’</a> and <a 1.72 - href="#rubyspan">‘<code class=property>ruby-span</code>’</a>. They 1.73 - differ by the required ‘<code class=property>display</code>’ 1.74 - property values. The Simple Ruby model requires the values: ‘<a 1.75 - href="#ruby"><code class=property>ruby</code></a>’, ‘<code 1.76 - class=property>ruby-base</code>’ and ‘<code 1.77 - class=property>ruby-text</code>’. The Complex Ruby model requires in 1.78 - addition the values: ‘<code 1.79 - class=property>ruby-base-container</code>’ and ‘<code 1.80 - class=property>ruby-text-container</code>’. 1.81 + <pre> 1.82 +<!-- -->ruby { display: ruby; } 1.83 +<!-- -->rb { display: ruby-base; white-space: nowrap; } 1.84 +<!-- -->rt { display: ruby-text; white-space: nowrap; font-size: 50%; } 1.85 +<!-- -->rbc { display: ruby-base-container; } 1.86 +<!-- -->rtc { display: ruby-text-container; }</pre> 1.87 1.88 - <h2 id=glossary><span class=secno>5. </span> Glossary</h2> 1.89 + <p>Additional rules for UAs supporting the relevant features of <a 1.90 + href="#CSS3-TEXT-DECOR" 1.91 + rel=biblioentry>[CSS3-TEXT-DECOR]<!--{{CSS3-TEXT-DECOR}}--></a> and <a 1.92 + href="#CSS3-FONTS" 1.93 + rel=biblioentry>[CSS3-FONTS]<!--{{CSS3-FONTS}}--></a>: 1.94 + 1.95 + <pre>rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre> 1.96 + 1.97 + <p class=note>Authors should not use the above rules; a UA that supports 1.98 + ruby layout should provide these by default. 1.99 + 1.100 + <h3 class=no-num id=default-inline> Inlining Ruby Annotations</h3> 1.101 + 1.102 + <p>The following represents a sample style sheet for rendering HTML and 1.103 + XHTML ruby markup as inline annotations: 1.104 + 1.105 + <pre>ruby, rb, rt, rbc, rtc, rp { 1.106 +<!-- --> display: inline; white-space: inherit; 1.107 +<!-- --> font-variant-east-asian: inherit; text-emphasis: inherit; }</pre> 1.108 + 1.109 + <h3 class=no-num id=default-parens> Generating Parentheses</h3> 1.110 + 1.111 + <p>Unfortunately, because Selectors cannot match against text nodes, it's 1.112 + not possible with CSS to express rules that will automatically and 1.113 + correctly add parentheses to unparenthesized ruby annotations in HTML. 1.114 + However, an author rigorously using <code><rtc></code> elements 1.115 + around all annotations can use CSS Level 2 generated content <a 1.116 + href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> to generate 1.117 + parentheses: 1.118 + 1.119 + <pre> 1.120 +<!-- -->rtc::before { content: "("; } 1.121 +<!-- -->rtc::after { content: ")"; }</pre> 1.122 + 1.123 + <p>Alternatively, an author rigorously using both <code><rb></code> 1.124 + and <code><rt></code> elements but no <code><rtc></code> 1.125 + elements can use these rules instead: 1.126 + 1.127 + <pre> 1.128 +<!-- -->rb + rt::before { content: "("; } 1.129 +<!-- -->rt:last-child::after, rt + rb::before { content: ")"; }</pre> 1.130 + 1.131 + <p class=Issue>Try to make these smarter somehow? 1.132 + 1.133 + <h2 id=glossary><span class=secno>4. </span> Glossary</h2> 1.134 1.135 <dl> 1.136 <dt><a id=g-bopomofo><strong><span lang=zh>Bopomofo</span></strong></a> 1.137 @@ -1398,9 +1442,9 @@ 1.138 and serves as an annotation or a pronunciation guide for that text. 1.139 </dl> 1.140 1.141 - <h2 id=conformance><span class=secno>6. </span> Conformance</h2> 1.142 + <h2 id=conformance><span class=secno>5. </span> Conformance</h2> 1.143 1.144 - <h3 id=conventions><span class=secno>6.1. </span> Document conventions</h3> 1.145 + <h3 id=conventions><span class=secno>5.1. </span> Document conventions</h3> 1.146 1.147 <p>Conformance requirements are expressed with a combination of 1.148 descriptive assertions and RFC 2119 terminology. The key words 1.149 @@ -1427,7 +1471,7 @@ 1.150 1.151 <p class=note>Note, this is an informative note. 1.152 1.153 - <h3 id=conformance-classes><span class=secno>6.2. </span> Conformance 1.154 + <h3 id=conformance-classes><span class=secno>5.2. </span> Conformance 1.155 classes</h3> 1.156 1.157 <p>Conformance to CSS Ruby Module is defined for three conformance 1.158 @@ -1473,7 +1517,7 @@ 1.159 meet all other conformance requirements of style sheets as described in 1.160 this module. 1.161 1.162 - <h3 id=partial><span class=secno>6.3. </span> Partial implementations</h3> 1.163 + <h3 id=partial><span class=secno>5.3. </span> Partial implementations</h3> 1.164 1.165 <p>So that authors can exploit the forward-compatible parsing rules to 1.166 assign fallback values, CSS renderers <strong>must</strong> treat as 1.167 @@ -1487,7 +1531,7 @@ 1.168 considered invalid (as unsupported values must be), CSS requires that 1.169 the entire declaration be ignored. 1.170 1.171 - <h3 id=experimental><span class=secno>6.4. </span> Experimental 1.172 + <h3 id=experimental><span class=secno>5.4. </span> Experimental 1.173 implementations</h3> 1.174 1.175 <p>To avoid clashes with future CSS features, the CSS2.1 specification 1.176 @@ -1502,7 +1546,7 @@ 1.177 Working Drafts. This avoids incompatibilities with future changes in the 1.178 draft. 1.179 1.180 - <h3 id=testing><span class=secno>6.5. </span> Non-experimental 1.181 + <h3 id=testing><span class=secno>5.5. </span> Non-experimental 1.182 implementations</h3> 1.183 1.184 <p>Once a specification reaches the Candidate Recommendation stage, 1.185 @@ -1571,6 +1615,26 @@ 1.186 style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.187 <!----> 1.188 1.189 + <dt id=CSS3-FONTS>[CSS3-FONTS] 1.190 + 1.191 + <dd>John Daggett. <a 1.192 + href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/"><cite>CSS 1.193 + Fonts Module Level 3.</cite></a> 12 February 2013. W3C Working Draft. 1.194 + (Work in progress.) URL: <a 1.195 + href="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/">http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</a> 1.196 + </dd> 1.197 + <!----> 1.198 + 1.199 + <dt id=CSS3-TEXT-DECOR>[CSS3-TEXT-DECOR] 1.200 + 1.201 + <dd>Elika J. Etemad; Koji Ishii. <a 1.202 + href="http://www.w3.org/TR/2013/WD-css-text-decor-3-20130103/"><cite>CSS 1.203 + Text Decoration Module Level 3.</cite></a> 3 January 2013. W3C Working 1.204 + Draft. (Work in progress.) URL: <a 1.205 + href="http://www.w3.org/TR/2013/WD-css-text-decor-3-20130103/">http://www.w3.org/TR/2013/WD-css-text-decor-3-20130103/</a> 1.206 + </dd> 1.207 + <!----> 1.208 + 1.209 <dt id=CSS3VAL>[CSS3VAL] 1.210 1.211 <dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a 1.212 @@ -1612,10 +1676,10 @@ 1.213 <!--begin-index--> 1.214 <ul class=indexlist> 1.215 <li>authoring tool, <a href="#authoring-tool" 1.216 - title="section 6.2."><strong>6.2.</strong></a> 1.217 + title="section 5.2."><strong>5.2.</strong></a> 1.218 1.219 <li>renderer, <a href="#renderer" 1.220 - title="section 6.2."><strong>6.2.</strong></a> 1.221 + title="section 5.2."><strong>5.2.</strong></a> 1.222 1.223 <li>Ruby, <a href="#ruby" title="section 1.4."><strong>1.4.</strong></a> 1.224 1.225 @@ -1683,7 +1747,7 @@ 1.226 <li>style sheet 1.227 <ul> 1.228 <li>as conformance class, <a href="#style-sheet" 1.229 - title="section 6.2."><strong>6.2.</strong></a> 1.230 + title="section 5.2."><strong>5.2.</strong></a> 1.231 </ul> 1.232 </ul> 1.233 <!--end-index-->
2.1 --- a/css-ruby/Overview.src.html Tue Jun 18 22:44:44 2013 +0900 2.2 +++ b/css-ruby/Overview.src.html Tue Jun 18 22:59:49 2013 +0900 2.3 @@ -967,25 +967,63 @@ 2.4 <myrt rbspan="3">Expiration Date</myrt> 2.5 </myrtc> 2.6 </myruby></pre> 2.7 - 2.8 -<p class="issue"><span class="issuehead">Issue: </span> The i18n WG has requested the addition of a sample user agent default style sheet, as promised by Ruby Annotation section 3.4. See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=[CSS3+Ruby]%20Default+stylesheet&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&index-grp=Member__FULL+Public__FULL&index-type=t&type-index=public-i18n-core%40w3.org&resultsperpage=20&sortby=date">this thread</a>.</p> 2.9 --> 2.10 2.11 -<h2 id="profiles"> 2.12 -Profiles</h2> 2.13 +<h2 id="default-stylesheet" class="no-num"> 2.14 +Appendix A: Default Style Sheet</h2> 2.15 2.16 -<p>There are two modules defined by this module:</p> 2.17 + <p><em>This section is informative.</em> 2.18 2.19 -<p>CSS3 Simple Ruby model</p> 2.20 +<h3 id="default-ua-ruby" class="no-num"> 2.21 +<span class="secno">A.1</span> Supporting Ruby Layout</h3> 2.22 2.23 -<p>CSS3 Complex Ruby model.</p> 2.24 + <p>The following represents a default UA style sheet 2.25 + for rendering HTML and XHTML ruby markup as ruby layout: 2.26 2.27 -<p>They both contain all the properties specified by this CSS chapter, i.e. <a 2.28 -href="#rubyalign">'ruby-align'</a>, <a href="#rubyover">'ruby-overhang'</a>, <a href="#rubypos">'ruby-position'</a> 2.29 -and <a href="#rubyspan">'ruby-span'</a>. They differ by the required 2.30 -'display' property values. The Simple Ruby model requires the values: 'ruby', 2.31 -'ruby-base' and 'ruby-text'. The Complex Ruby model requires in addition the 2.32 -values: 'ruby-base-container' and 'ruby-text-container'.</p> 2.33 + <pre> 2.34 +<!-- -->ruby { display: ruby; } 2.35 +<!-- -->rb { display: ruby-base; white-space: nowrap; } 2.36 +<!-- -->rt { display: ruby-text; white-space: nowrap; font-size: 50%; } 2.37 +<!-- -->rbc { display: ruby-base-container; } 2.38 +<!-- -->rtc { display: ruby-text-container; }</pre> 2.39 + 2.40 + <p>Additional rules for UAs supporting the relevant features of [[CSS3-TEXT-DECOR]] and [[CSS3-FONTS]]: 2.41 + <pre>rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre> 2.42 + 2.43 + <p class="note">Authors should not use the above rules; 2.44 + a UA that supports ruby layout should provide these by default. 2.45 + 2.46 +<h3 id="default-inline" class="no-num"> 2.47 +<span class="secno">A.2</span> Inlining Ruby Annotations</h3> 2.48 + 2.49 + <p>The following represents a sample style sheet 2.50 + for rendering HTML and XHTML ruby markup as inline annotations: 2.51 + 2.52 + <pre>ruby, rb, rt, rbc, rtc, rp { 2.53 +<!-- --> display: inline; white-space: inherit; 2.54 +<!-- --> font-variant-east-asian: inherit; text-emphasis: inherit; }</pre> 2.55 + 2.56 +<h3 id="default-parens" class="no-num"> 2.57 +<span class="secno">A.3</span> Generating Parentheses</h3> 2.58 + 2.59 + <p>Unfortunately, because Selectors cannot match against text nodes, 2.60 + it's not possible with CSS to express rules that will automatically and correctly 2.61 + add parentheses to unparenthesized ruby annotations in HTML. 2.62 + However, an author rigorously using <code><rtc></code> elements 2.63 + around all annotations 2.64 + can use CSS Level 2 generated content [[!CSS21]] to generate parentheses: 2.65 + <pre> 2.66 +<!-- -->rtc::before { content: "("; } 2.67 +<!-- -->rtc::after { content: ")"; }</pre> 2.68 + 2.69 + <p>Alternatively, an author rigorously using 2.70 + both <code><rb></code> and <code><rt></code> elements but no <code><rtc></code> elements 2.71 + can use these rules instead: 2.72 + <pre> 2.73 +<!-- -->rb + rt::before { content: "("; } 2.74 +<!-- -->rt:last-child::after, rt + rb::before { content: ")"; }</pre> 2.75 + 2.76 + <p class="Issue">Try to make these smarter somehow?</p> 2.77 2.78 <h2 id="glossary"> 2.79 Glossary</h2>