Tue, 18 Jun 2013 22:09:00 +0900
[css-ruby] fix indentation
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>CSS Ruby Module Level 1</title>
6 <link rel=contents href="#contents">
7 <link rel=index href="#index">
8 <link rel="stylesheet" type="text/css" href="../default.css">
9 <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
10 <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
11 </head>
13 <body class="h-entry">
15 <div class="head">
16 <!--logo-->
18 <h1 class="p-name">CSS Ruby Module Level 1</h1>
20 <h2 class="no-num no-toc">[LONGSTATUS] <time class="dt-updated" datetime="[CDATE]">[DATE]</time> <!-- for HTML4 doctype: <span class="value-title" title="[CDATE]">[DATE]</span></span> --> </h2>
21 <dl>
22 <dt>This version:
23 <dd><a class="u-url" href="[VERSION]">[VERSION]</a>
25 <dt>Latest version:
26 <dd><a href="http://www.w3.org/TR/[SHORTNAME]/">http://www.w3.org/TR/css3-ruby/</a>
28 <dt>Editor's draft:
29 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
30 (<a href="https://dvcs.w3.org/hg/csswg/log/tip/[SHORTNAME]/Overview.src.html">change log</a>)
32 <dt>Previous version:
33 <dd><a href="http://www.w3.org/TR/2011/WD-css3-ruby-20110630/">
34 http://www.w3.org/TR/2011/WD-css3-ruby-20110630/</a>
36 <dt>Issue Tracking:</dt>
37 <dd><a rel="issues" href="http://www.w3.org/Style/CSS/Tracker/products/FIXME">http://www.w3.org/Style/CSS/Tracker/products/FIXME</a>
39 <dt>Feedback:</dt>
40 <dd><a href="mailto:www-style@w3.org?subject=%5BSHORTNAME%5D%20feedback"
41 >www-style@w3.org</a>
42 with subject line “<kbd>[[SHORTNAME]]
43 <var>… message topic …</var></kbd>”
44 (<a rel="discussion" href="http://lists.w3.org/Archives/Public/www-style/"
45 >archives</a>)
47 <dt>Editors:
48 <dd class="p-author h-card vcard">
49 <a class="p-name fn u-url url" rel="author"
50 href="http://fantasai.inkedblade.net/contact">Elika J. Etemad</a>,
51 <a class="p-org org h-org" href="http://www.mozilla.org/">Mozilla</a>
52 <dd class="p-author h-card vcard">
53 <a class="p-name fn u-url url" rel="author"
54 href="mailto:koji.a.ishii@mail.rakuten.com">Koji Ishii</a>,
55 <span class="p-org org">Rakuten, Inc.</span>
56 <dd class="p-author h-card vcard">
57 <a class="p-name fn u-url url" rel="author"
58 href="mailto:ishida@w3.org">Richard Ishida</a>,
59 <span class="p-org org">W3C</span>
61 <dt>Former editors:
62 <dd>Michel Suignard, Microsoft
63 <dd>Marcin Sawicki, Microsoft
64 </dl>
66 <!--copyright-->
68 <hr title="Separator for header">
69 </div>
71 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
73 <p>
74 <span class="p-summary">
75 “Ruby” are short runs of text alongside the base text,
76 typically used in East Asian documents to indicate pronunciation
77 or to provide a short annotation.
78 This module describes the rendering model and formatting controls
79 related to displaying ruby annotations in CSS.
80 </span>
82 <a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing
83 the rendering of structured documents (such as HTML and XML) on screen, on
84 paper, in speech, etc.
86 <h2 class="no-num no-toc" id="status">Status of this document</h2>
88 <!--status-->
90 <p>The following features are at risk: …
92 <h2 class="no-num no-toc" id="contents">
93 Table of Contents</h2>
95 <!--toc-->
97 <h2 id="intro">
98 Introduction</h2>
100 <p><em>This section is not normative.</em>
102 <h3 id="placement">
103 Module interactions</h3>
105 <p>This module extends the inline box model of CSS Level 2 [[!CSS21]]
106 to support ruby.
108 <p>None of the properties in this module apply to the <code>::first-line</code> or
109 <code>::first-letter</code> pseudo-elements.
111 <h3 id="values">
112 Values</h3>
114 <p>This specification follows the
115 <a href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
116 definition conventions</a> from [[!CSS21]]. Value types not defined in
117 this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
118 Other CSS modules may expand the definitions of these value types: for
119 example [[CSS3VAL]], when combined with this module, expands the
120 definition of the <var><length></var> value type as used in this specification.</p>
122 <p>In addition to the property-specific values listed in their definitions,
123 all properties defined in this specification also accept the
124 <a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
125 keyword as their property value. For readability it has not been repeated
126 explicitly.
128 <h3 id="conventions">
129 Document conventions</h3>
131 <p>Many typographical conventions in East Asian typography depend
132 on whether the character rendered is wide (CJK) or narrow (non-CJK).
133 There are a number of illustrations in this document
134 for which the following legend is used:
136 <dl>
137 <dt><img alt="Symbolic wide-cell glyph representation" width="39" height="39" src="images/fullwidth.gif">
138 <dd>Wide-cell glyph (e.g. Han) that is the <var>n</var>th character in the text run.
139 They are typically sized to 50% when used as annotations.
140 <dt><img alt="Symbolic narrow-cell glyph representation" width="19" height="39" src="images/halfwidth.gif">
141 <dd>Narrow-cell glyph (e.g. Roman) which is the <var>n</var>th glyph in the text run.
143 <p>The orientation which the above symbols assume in the diagrams
144 corresponds to the orientation that the glyphs they represent
145 are intended to assume when rendered by the user agent.
146 Spacing between these characters in the diagrams is incidental,
147 unless intentionally changed to make a point.
149 <h3 id="ruby-def">
150 What is ruby?</h3>
152 <p><dfn>Ruby</dfn> is the commonly-used name for a run of text
153 that appears alongside another run of text (referred to as the “base”)
154 and serves as an annotation or a pronunciation guide associated with that run of text.
156 <p>The following figures show two examples of Ruby,
157 a simple case and one with more complicated structure.
159 <div class="example">
160 <p>In this first example, a single annotation is used to annotate the base text.
161 <div class="figure">
162 <p><img src="images/licence.png"
163 alt="Example of ruby applied on top of a Japanese expression">
164 <p class="caption">Example of ruby used in Japanese (simple case)
165 </div>
166 <p>In Japanese typography, this case is sometimes called
167 <i lang="ja">taigo</i> ruby or group-ruby (per-word ruby),
168 because the annotation as a whole is associated
169 with multi-character word (as a whole).
170 </div>
172 <div class="example">
173 <p>In this second example,
174 two levels of annotations are attached to a base sequence:
175 the hiragana characters on top refer to the pronunciation of each of the base kanji characters,
176 while the words “Keio” and “University” on the bottom are annotations describing the English translation.
177 <div class="figure">
178 <p><img src="images/ruby-univ.gif"
179 alt="Example showing complex ruby with annotation text over and under the base characters">
180 <p class="caption">Complex ruby with annotation text over and under the base characters
181 </div>
182 <p>
183 <p>Notice that to allow correct association between the hiragana characters and
184 their corresponding Kanji base characters,
185 the spacing between these Kanji characters is adjusted.
186 (This happens around the fourth Kanji character in the figure above.)
187 To avoid variable spacing between the Kanji characters in the example above
188 the hiragana annotations can be styled as a <i>collapsed annotation</i>,
189 which will look more like the group-ruby example earlier.
190 However because the base-annotation pairings are recorded in the ruby structure,
191 if the text breaks across lines, the annotation characters will stay
192 correctly paired with their respective base characters.
193 </div>
195 <i>Ruby</i> formatting as used in Japanese is described in JIS X-4051 [[JIS4051]] (in Japanese)
196 and in Requirements for Japanese Text Layout [[JLREQ]] (in English and Japanese)].
197 In HTML, ruby structure and markup to represent it is described
198 in the Ruby Markup Extension specification.
199 This module describes the CSS rendering model
200 and formatting controls relevant to ruby layout of such markup.
202 <h2 id="ruby-model">
203 Ruby Formatting Model</h2>
205 <p>The CSS ruby model is based on
206 the <a href="http://darobin.github.io/html-ruby/">HTML Ruby Markup Extension</a>
207 and <a href="http://www.w3.org/TR/ruby/">XHTML Ruby Annotation Recommendation</a> [[RUBY]].
208 In this model, a ruby structure consists of
209 one or more <dfn>ruby base</dfn> elements representing the base (annotated) text,
210 associated with one or more levels of <dfn>ruby annotation</dfn> elements representing the annotations.
211 The structure of ruby is similar to that of a table:
212 there are “rows” (the base text level, each annotation level)
213 and “columns” (each <i>ruby base</i> and its corresponding <i>ruby annotations</i>).
215 <p>Consecutive bases and annotations are grouped together into <dfn>ruby segments</dfn>.
216 Within a <i>ruby segment</i>, a <i>ruby annotation</i> may span multiple <i>ruby bases<i>.
218 <p class="note">In HTML, a single <code><ruby></code> element may contain multiple <i>ruby segments</i>.
219 (In the XHTML Ruby model, a single <code><ruby></code> element can only contain one <i>ruby segment</i>.)
221 <h3 id="ruby-display">
222 Ruby-specific 'display' property values</h3>
224 <p>For document languages (such as XML applications) that do not have pre-defined ruby elements,
225 authors must map document language elements to ruby elements;
226 this is done with the 'display' property.
228 <table class="propdef">
229 <tr>
230 <th>Name:
231 <td>display
232 <tr>
233 <th><a href="#values">New Values</a>:
234 <td>ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container
235 </table>
237 <p>The following new 'display' values assign ruby layout roles to an arbitrary element:
239 <dl>
240 <dt>''ruby''
241 <dd>Specifies that an element generates a <dfn>ruby container box</dfn>.
242 (Corresponds to HTML/XHTML <code><ruby></code> elements.)
243 <dt>''ruby-base''
244 <dd>Specifies that an element generates a <dfn>ruby base box</dfn>.
245 (Corresponds to HTML/XHTML <code><rb></code> elements.)
246 <dt>''ruby-text''
247 <dd>Specifies that an element generates a <dfn>ruby annotation box</dfn>.
248 (Corresponds to HTML/XHTML <code><rt></code> elements.)
249 <dt>''ruby-base-container''
250 <dd>Specifies that an element generates a <dfn>ruby base container box</dfn>.
251 (Corresponds to XHTML <code><rbc></code> elements; always implied in HTML.)
252 <dt>''ruby-text-container''
253 <dd>Specifies that an element generates a <dfn>ruby annotation container box</dfn>.
254 (Corresponds to HTML/XHTML <code><ruby></code> elements.)
255 </dl>
257 <p>The CSS model does not require that the document language
258 include elements that correspond to each of these components.
259 Missing parts of the structure are implied through the anonymous box generation rules.
261 <p class="issue">The spec needs to address anonymous box generation rules (and to make them compatible with HTML5 ruby markup).
262 <p class="issue">How should box generation rules deal with ruby elements that contain block-level boxes?
263 Turn them into inline blocks? Treat them as 'display: none'? Force them to float? Something else?
265 <h3 id="box-model">
266 Ruby box model</h3>
268 <p>In the following description, the elements specified by Ruby
269 Annotation [[RUBY]] are used to describe the box model. As mentioned
270 earlier, a user agent can obtain the same results by using the Ruby specific 'display'
271 property values. </p>
273 <p>For a user agent that supports the ruby markup, the ruby structure consists of three or more
274 boxes. The outermost container is the <a
275 href="http://www.w3.org/TR/ruby/#ruby"><samp>ruby</samp></a> element itself.
276 In the simple case, it is a container for two non-overlapping boxes: the ruby
277 text box (<a href="http://www.w3.org/TR/ruby/#rt"><samp>rt</samp></a> element)
278 and the ruby base box (<a
279 href="http://www.w3.org/TR/ruby/#rb"><samp>rb</samp></a> element). The
280 positioning of these two boxes relative to each other is controlled by the <a
281 href="#rubypos">'ruby-position'</a> property.</p>
283 <div class="figure">
284 <img class="example" width="223" height="93"
285 alt="Diagram of the ruby box model consisting of two boxes, one on top of the other, enclosed within a third box representing the ruby element"
286 src="images/r-box-t.gif" />
288 <p><b>Figure 3.2.1</b>: Ruby box model (simple case)</p>
289 </div>
291 <p>In the case of complex ruby, the ruby element is a container for two or
292 three non-overlapping boxes: one ruby base collection (<a
293 href="http://www.w3.org/TR/ruby/#rbc"><samp>rbc</samp></a> element), and one
294 or two ruby text collections (<a
295 href="http://www.w3.org/TR/ruby/#rtc"><samp>rtc</samp></a> element). The
296 <samp>rbc</samp> element is itself a container for one or several ruby base
297 box (<samp>rb</samp> element), while each <samp>rtc</samp> element is a
298 container for one or several ruby text box (rt element). The position of the
299 <samp>rtc</samp> element in relation to the related <samp>rbc</samp> element
300 is controlled by the <a href="#rubypos">'ruby-position'</a> property. The two
301 following figures show examples of these complex ruby.</p>
303 <div class="figure">
304 <img src="images/r-box-g.gif"
305 alt="Diagram of a group ruby with a full ruby text above and partial ruby text below" width="408" height="170" />
307 <p><b>Figure 3.2.2</b>: Ruby box model (complex ruby with an empty rt element
308 after)</p>
309 </div>
311 <p>In the example above, the ruby text after (below) the ruby bases contains two <samp>rt</samp> elements with the first one
312 being empty, the empty <samp>rt</samp> element corresponds to the first part
313 of the ruby base collection (the first part is identified by the first <samp>rb</samp> element
314 within the <samp> rbc</samp> element).</p>
316 <div class="figure">
317 <img src="images/r-box-h.gif"
318 alt="Diagram of a group ruby with a spanning ruby text above and partial ruby text below" width="400" height="173" />
320 <p><b>Figure 3.2.3</b>: Ruby box model (complex ruby with a spanning ruby text
321 element)</p>
322 </div>
324 <p>In the example above, the ruby text before (above) the ruby bases spans the whole ruby base collection. The
325 ruby text after (below) the ruby bases still contain two <samp>rt</samp> elements, one of
326 which is empty. The spanning behavior of <samp>rt</samp> text elements is
327 controlled by the <a
328 href="http://www.w3.org/TR/ruby/#ruby"><samp>rbspan</samp></a> attribute in a
329 way similar to the <samp>colspan</samp> attribute used for table column.</p>
331 <p class="issue"><span class="issuehead">Issue: </span> The examples above contain the term 'group ruby', which is not used elsewhere in this specification. It appears to be used in a way that is different to the use of the term in JLREQ. I propose to replace it with just 'ruby'.</p>
332 <p class="note"><span class="note-label">Note:</span> The visual description of the ruby elements does not refer
333 necessarily to the logical orders of the elements</p>
335 <p>The width of the ruby box is by default determined by its widest child
336 element, whose width in turn is determined by its content. The width of all direct
337 children of the <samp>ruby</samp> element is the width of the widest children. In this respect, the ruby
338 box is much like a two or three row <samp>table</samp> element, with the
339 following exceptions:</p>
340 <ul>
341 <li>the ruby box is an inline element, like an image, even though it itself,
342 like a table, is a container of other boxes</li>
343 <li>the equivalent of the cells: the <samp>rb</samp> element and the
344 <samp>rt</samp> text element can only contain inline-level elements.</li>
345 <li>the content of each 'cell' is always measured at its maximum width</li>
346 <li>unlike a table, a ruby element doesn't have to fit in a line, the ruby
347 box may be split into several boxes at line boundary, depending of the
348 spanning of the ruby texts. This is however only possible for the complex
349 ruby and can only happen at the boundary of non spanning elements.</li>
350 <li>both the ruby text and the ruby base boxes may overlap with adjacent
351 text (outside of the ruby element) if an appropriate <a
352 href="#rubyover">'ruby-overhang'</a> parameter is set via CSS. Note
353 however that the actual content of the ruby base cannot overlap with that
354 adjacent text. The distribution of the content of the ruby base within the
355 ruby base box is controlled by the <a href="#rubyalign">'ruby-align'</a>
356 property.</li>
357 </ul>
359 <p>If the ruby text is not allowed to overhang, then the ruby behaves like a
360 traditional box, i.e. only its contents are rendered within its boundaries and
361 adjacent elements do not cross the box boundary:</p>
363 <div class="figure">
364 <p><img class="example" width="220" height="91"
365 alt="Diagram showing the ruby boxes interacting with adjacent text"
366 src="images/ro-n.gif" /></p>
368 <p><b>Figure 3.2.4</b>: Simple ruby whose text is not allowed to overhang
369 adjacent text</p>
370 </div>
372 <p>However, if ruby text is allowed to overhang adjacent elements and it
373 happens to be wider than its base, then the adjacent content is partially
374 rendered within the area of the ruby base box, while the ruby text may be
375 partially overlapping with the upper blank parts of the adjacent content:</p>
377 <div class="figure">
378 <p><img class="example" width="177" height="91"
379 alt="Diagram showing the ruby boxes interacting with adjacent text"
380 src="images/ro-a.gif" /></p>
382 <p><b>Figure 3.2.5</b>: Simple ruby whose text is allowed to overhang adjacent
383 text</p>
384 </div>
386 <p>The ruby text related to a ruby base can never overhang another ruby
387 base.</p>
389 <p>The alignment of the contents of the base or the ruby text is not affected
390 by the overhanging behavior. The alignment is achieved the same way regardless
391 of the overhang behavior setting and it is computed before the space available
392 for overlap is determined. It is controlled by the <a
393 href="#rubyalign">'ruby-align'</a> property.</p>
395 <p>The exact circumstances in which the ruby text will overhang other
396 elements, and to what degree it will do so, will be controlled by the <a
397 href="#rubyover">'ruby-overhang'</a> property.</p>
399 <p>This entire logic applies the same way in vertical ideographic layout, only
400 the dimension in which it works in such a layout is vertical, instead of
401 horizontal.</p>
403 <p class="note"><span class="note-label">Note:</span> Because the purpose of the XHTML <samp>rp</samp> element
404 [[RUBY]] is to allow pre-existing user agents
405 to parenthesize ruby text content, an XHTML user agent should use a styling rule
406 for these elements that avoids rendering them such as <samp>rp {display:
407 none}</samp>.</p>
409 <h3 id="ruby-line-height">
410 Ruby box and line stacking</h3>
412 <p>The interaction of the ruby box and line stacking is controlled by the
413 'line-stacking-ruby' property described in the CSS3 Line Module. That property
414 takes two values: 'include-ruby' and 'exclude-ruby. Depending on the property
415 value, the ruby box is considered or excluded for line stacking. Even if the
416 ruby box is considered for line stacking, some values of the
417 'line-stacking-strategy' property (also described in the CSS3 Line module) can
418 still create occurrences where a the ruby box will eventually be ignored (e.g.
419 case where the 'line-stacking-strategy' value is 'block-line-height').</p>
421 <p>In the following figure, each line box is shown with leading space
422 distributed before and after the two text segments ('Previous line' and 'Ruby
423 base'); the dotted lines show the line box for each line. The
424 'line-stacking-ruby' property is set to 'exclude-ruby'. The achieved effect is
425 that the ruby box does not affect the line to line spacing. It is however the
426 responsibility of the style author to avoid 'bleeding' effects between the ruby
427 text and the surrounding text of images.</p>
429 <div class="figure">
430 <p>
431 <img class="example"
432 alt="Diagram showing the ruby text using 2 half leading"
433 src="images/rlh-a.gif" width="210" height="138" /></p>
435 <p><b>Figure 3.3.1</b>: Excluded Ruby text</p>
436 </div>
439 <p>In the following figure, the line boxes have no extra leading space. The
440 'line-stacking-ruby' property is set to 'include-ruby' and the
441 'line-stacking-strategy' property is set to a value where inline boxes are
442 considered for line stacking. In this case, the line box with
443 the ruby text is affected and has its 'stack-height' increased by the amount
444 necessary to fit the ruby text.</p>
446 <div class="figure">
447 <p>
448 <img class="example"
449 alt="Diagram showing the ruby text expanding above base text"
450 src="images/rlh-b.gif" width="210" height="111" /></p>
452 <p><b>Figure 3.3.2</b>: Ruby text increasing line height</p>
453 </div>
454 <p>This mechanism allows rendering of evenly spaced lines of text within a
455 block-level element, whether a line contains ruby or not. The authors need
456 only to set for the block-level element a line height value larger than the
457 computed line-height of the largest ruby element within the block.</p>
459 <h3 id="ruby-line-breaking">
460 Ruby box and line breaking</h3>
462 <p>When a ruby falls at the end of a line where there is not sufficient room for the entire ruby to fit on the line, the complex ruby may be broken at locations where boxes of the ruby container align. Some examples are provided below to provide more clarity.</p>
464 <p>
465 <img class="example"
466 alt="Diagram showing the line breaking opportunity in a complex ruby"
467 src="images/r-break-a.gif" width="408" height="201" /></p>
469 <p><b>Figure 3.4.1</b>: Complex ruby line breaking opportunity</p>
471 <p>
472 <img class="example"
473 alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'
474 src="images/r-break-b.gif" width="300" height="90" /></p>
476 <p><b>Figure 3.4.1</b>: "Bopomofo" ruby line breaking opportunity</p>
477 <p class="issue"><span class="issuehead">Issue: </span> Line breaks should only be allowed within ruby if the ruby base text can be broken at that point. E.g. if complex Ruby is used to annotate the two morphemes of "butterfly", the fact that we have added ruby annotations should not cause a line breaking opportunity to be present between "butter" and "fly" </p>
478 <h2 id="ruby-props">
479 Ruby Properties</h2>
481 <h3 id="rubypos">
482 Ruby positioning: the 'ruby-position' property</h3>
484 <table class="propdef">
485 <tr>
486 <th>Name:
487 <td><dfn>ruby-position</dfn>
488 <tr>
489 <th>Value:
490 <td>before | after | inter-character | inline
491 <tr>
492 <th>Initial:
493 <td>before
494 <tr>
495 <th>Applies to:
496 <td>the parent of elements with display: ruby-text.
497 <tr>
498 <th>Inherited:
499 <td>yes
500 <tr>
501 <th>Percentages:
502 <td>N/A
503 <tr>
504 <th>Media:
505 <td>visual
506 <tr>
507 <th>Computed value:
508 <td>specified value (except for initial and inherit)
509 <tr>
510 <th>Animatable:
511 <td>no
512 <tr>
513 <th>Canonical order:
514 <td><abbr title="follows order of property value definition">per grammar</abbr>
515 </table>
516 <p class="issue"><span class="issuehead">Issue: </span> We replaced 'right' with 'inter-character', since that was its original intended purpose and such removes potential ambiguity with 'inline' or 'before'. Bopomofo ruby needs special handling by the implementation, if ruby is to always appear to the right. (Note that the user may also choose to position bopomofo ruby before the base, in which case they would use the normal 'before' setting.)</p>
517 <p>This property is used by the parent of elements with display: ruby-text to
518 control the position of the ruby text with respect to its base. Such parents
519 are typically either the <samp>ruby</samp> element itself (simple ruby) or the
520 <samp>rtc</samp> element (complex ruby). This assures that all parts of a <samp>rtc</samp>
521 element will be displayed in the same position. Possible values:</p>
522 <p class="issue"><span class="issuehead">Issue-107: </span> Roland Steiner has requested the addition of an auto value as default. See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=ruby-position%3A+undesirable+default+value+%27before%27+for+complex+ruby&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&period_month=&period_year=&index-grp=Public__FULL&index-type=t&type-index=www-style&resultsperpage=20&sortby=date">this thread</a> and <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=Styling+of+complex+Ruby&hdr-2-name=from&hdr-2-query=&hdr-3-name=message-id&hdr-3-query=&period_month=&period_year=&index-grp=Public__FULL&index-type=t&type-index=public-i18n-core&resultsperpage=20&sortby=date">this one</a>.</p>
523 <dl>
524 <dt><strong>before</strong></dt>
525 <dd>The ruby text appears before the base. This is the most common setting
526 used in ideographic East Asian writing systems. This is the initial
527 value.
529 <div class="figure">
530 <p>
531 <img
532 alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing above the base"
533 class="example" src="images/shinkansen-top.gif" width="140" height="33" /></p>
534 <p><b>Figure 4.1.1</b>: Top ruby in horizontal layout applied to
535 Japanese text</p>
536 </div>
537 <p>If the base appears in a vertical-ideographic layout mode, the ruby
538 appears on the right side of the base and is rendered in the same layout
539 mode as the base (i.e. vertical-ideographic).</p>
541 <div class="figure">
542 <p>
543 <img
544 alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the right of the base"
545 class="example" src="images/shinkansen-right.gif" width="33" height="141" /></p>
546 <p><b>Figure 4.1.2</b>: Top ruby in vertical ideographic layout applied
547 to Japanese text</p>
548 </div>
549 </dd>
550 <dt><strong>after</strong></dt>
551 <dd>The ruby text appears after the base. This is a relatively rare
552 setting used in ideographic East Asian writing systems, most easily
553 found in educational text.
555 <div class="figure">
556 <p>
557 <img
558 alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing below the base"
559 class="example" src="images/shinkansen-bottom.gif" width="142" height="36" /></p>
560 <p><b>Figure 4.1.3</b>: Bottom ruby in horizontal layout applied to
561 Japanese text</p>
562 </div>
563 <p>If the base appears in a vertical ideographic mode, the bottom ruby
564 appears on the left side of the base and is rendered in the same layout
565 mode as the base (i.e. vertical).</p>
567 <div class="figure">
568 <p>
569 <img
570 alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the left of the base"
571 class="example" src="images/shinkansen-left.gif" width="37" height="141" /></p>
572 <p><b>Figure 4.1.4</b>: Bottom ruby in vertical ideographic layout applied
573 to Japanese text</p>
574 </div>
575 </dd>
576 <dt><strong>inter-character</strong></dt>
577 <dd>
578 <p class="issue"><span class="issuehead">Issue: </span> We replaced 'right' with 'inter-character', since that was its original intended purpose and such removes potential ambiguity with 'inline' or 'before'. Bopomofo ruby needs special handling by the implementation, if ruby is to always appear to the right. (Note that the user may also choose to position bopomofo ruby before the base, in which case they would use the normal 'before' setting.) See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=[CSS3+Ruby]%20Vertical+layout+not+enough+for+bopomofo&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> following a request from the i18n WG.</p>
579 <p>The ruby text appears on the right of the base. Unlike 'before' and
580 'after', this value is visual and is not relative to the text flow direction.</p>
582 <p>This value is provided for the special case of traditional Chinese as used especially in
583 Taiwan: ruby (made of <a href="#g-bopomofo"><span
584 lang="zh">bopomofo</span></a> glyphs) in that context appears vertically along
585 the right side of the base glyph, whether the layout of the base characters is vertical or horizontal:</p>
587 <div class="figure">
588 <p><img alt="Example of Taiwanese-style ruby" class="example"
589 width="138" height="42" src="images/bopomofo.gif" /></p>
590 <p><b>Figure 4.1.5</b>: "<span lang="zh">Bopomofo</span>" ruby in
591 traditional Chinese (ruby text shown in blue for clarity) in horizontal
592 layout</p>
593 </div>
594 <p class="note"><span class="note-label">Note:</span> The bopomofo
595 transcription is written in the normal way as part of the ruby text.
596 The user agent is responsible for ensuring the correct relative alignment
597 and positioning of the glyphs, including those corresponding to the
598 tone marks, when displaying. Tone marks are spacing characters that occur in memory at the end of the ruby text for each base character. They are usually displayed in a separate column to the right of the bopomofo characters, and the height of the tone mark depends on the number of characters in the syllable. One tone mark, however, is placed above the bopomofo, not to the right of it.</p>
599 <p class="note"><span class="note-label">Note:</span> To make bopomofo annotations appear before or after the base text, like annotations for most other East Asian writing systems, use the 'before' and 'after' values of ruby-position.</p>
600 <p>It is not defined how a user-agent should handle ruby text that is not bopomofo when the value of ruby-position is set to 'right'.</p>
601 <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
602 </dd>
603 <dt><strong>inline</strong></dt>
604 <dd>
605 <p>Ruby text follows the ruby base with no special styling. The value can be used to disable ruby text positioning.</p>
606 <p>If the author has used the XHTML <samp>rp</samp> element [[RUBY]] they should set the <samp>display</samp> value for that element to <samp>inline</samp>, so that the ruby text is distinguishable from the base text. If no <samp>rp</samp> element has been used, the author can use the <samp>content</samp> property with the <samp>:before</samp> and <samp>:after</samp> pseudo-elements to set off the ruby text. </p>
607 <p class="issue"><span class="issuehead">Issue: </span> Here is a <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=[CSS3+Ruby]%20inline+value+description+missing&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">request </a>for this section to be added, from the i18n WG..</p>
608 </dd>
609 </dl>
611 <p>If two rtc elements are set with the same ruby-position value, (for example
612 both 'before'), the relative position of the two elements is undefined. This
613 setting should not be used.</p>
615 <h3 id="rubyalign">
616 Ruby alignment: the 'ruby-align' property</h3>
618 <table class="propdef">
619 <tr>
620 <th>Name:
621 <td><dfn>ruby-align</dfn>
622 <tr>
623 <th>Value:
624 <td>auto | start | left | center | end | right | distribute-letter |
625 distribute-space | line-edge
626 <tr>
627 <th>Initial:
628 <td>auto
629 <tr>
630 <th>Applies to:
631 <td>all elements and generated content
632 <tr>
633 <th>Inherited:
634 <td>yes
635 <tr>
636 <th>Percentages:
637 <td>N/A
638 <tr>
639 <th>Media:
640 <td>visual
641 <tr>
642 <th>Computed value:
643 <td>specified value (except for initial and inherit)
644 </table>
646 <p>This property can be used on any element to control the text alignment of
647 the ruby text and ruby base contents relative to each other. It applies to all
648 the rubys in the element. For simple ruby, the alignment is applied to the
649 ruby child element whose content is shorter: either the <a
650 href="http://www.w3.org/TR/ruby/#rb"><samp>rb</samp></a> element or the <a
651 href="http://www.w3.org/TR/ruby/#rt"><samp>rt</samp></a> element [[RUBY]].
652 For complex ruby, the alignment is also applied to the
653 ruby child elements whose content is shorter: either the <samp>rb</samp>
654 element and/or one or two <samp>rt</samp> elements for each related ruby text
655 and ruby base element within the <samp>rtc</samp> and <samp>rbc</samp>
656 element.</p>
658 <p>Possible values:</p>
659 <p class="issue"><span class="issuehead">Issue: </span> Tony Graham has <a href="http://www.w3.org/Style/XSL/Group/FO/wiki/Ruby#Treat_CSS3_.22ruby-align.22_As_Shorthand.3F">suggested </a>that distribute-letter and distribute-space be values of a ruby-group-distribution property, and line-edge be moved to a ruby-alignment-edge property, and that the rest be gathered under a ruby-alignment property. And that ruby-align become a shorthand.</p>
660 <dl>
661 <dt><strong>auto</strong></dt>
662 <dd>The user agent determines how the ruby contents are aligned. This is
663 the initial value. The behavior recommended by [[JLREQ]] is for wide-cell ruby to be aligned in the 'distribute-space' mode:
664 <div class="figure">
665 <p><img class="example" width="145" height="91"
666 alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base"
667 src="images/ra-ds.gif" /><img class="example" width="145" height="91"
668 alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base"
669 src="images/ra-ds-rb.gif" /></p>
670 <p><b>Figure 4.2.1</b>: Wide-cell text in 'auto' ruby alignment is
671 'distribute-space' justified</p>
672 </div>
673 <p>The recommended behavior for narrow-cell glyph ruby is to be
674 aligned in the 'center' mode.</p>
676 <div class="figure">
677 <p><img
678 alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base"
679 class="example" width="145" height="91"
680 src="images/ra-c-h.gif" /><img
681 alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base"
682 class="example" width="145" height="91"
683 src="images/ra-c-rb-h.gif" /></p>
684 <p><b>Figure 4.2.2</b>: Narrow-width ruby text in 'auto' ruby alignment
685 is centered</p>
686 </div>
687 </dd>
688 <dt><strong>left</strong></dt>
689 <dd>The ruby text content is aligned with the start edge of the base.
691 <p class="issue"><span class="issuehead">Issue: </span> The i18n WG feels that start and left should not be synonymous, and proposed to drop left (there is no left/right in overhang)? See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&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>
693 <div class="figure">
694 <p><img
695 alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base"
696 class="example" width="145" height="91" src="images/ra-l.gif" /><img
697 class="example" width="145" height="91"
698 alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base"
699 src="images/ra-l-rb.gif" /></p>
700 <p><b>Figure 4.2.3</b>: Start ruby alignment</p>
701 </div>
702 </dd>
703 <dt><strong>center</strong></dt>
704 <dd>The ruby text content is centered within the width of the base. If the
705 length of the base is smaller than the length of the ruby text, then the
706 base is centered within the width of the ruby text.
708 <div class="figure">
709 <p><img class="example" width="145" height="91"
710 alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base"
711 src="images/ra-c.gif" /><img class="example" width="145" height="91"
712 alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base"
713 src="images/ra-c-rb.gif" /></p>
714 <p><b>Figure 4.2.4</b>: Center ruby alignment</p>
715 </div>
716 </dd>
717 <dt><strong>right</strong></dt>
718 <dd>The ruby text content is aligned with the end edge of the base.
719 <p class="issue"><span class="issuehead">Issue: </span> The i18n WG feels that end and right should not be synonymous, and proposed to drop right (there is no left/right in overhang)? See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&hdr-1-name=subject&hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&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>
720 <div class="figure">
721 <p><img class="example" width="145" height="91"
722 alt="Diagram of glyph layout in right aligned ruby when ruby text is shorter than base"
723 src="images/ra-r.gif" /><img class="example" width="145" height="91"
724 alt="Diagram of glyph layout in right aligned ruby when ruby text is longer than base"
725 src="images/ra-r-rb.gif" /></p>
726 <p><b>Figure 4.2.5</b>: End ruby alignment</p>
727 </div>
728 </dd>
729 <dt><strong>distribute-letter</strong></dt>
730 <dd>If the width of the ruby text is smaller than that of the base, then
731 the ruby text contents are evenly distributed across the width of the
732 base, with the first and last ruby text glyphs lining up with the
733 corresponding first and last base glyphs. If the width of the ruby text
734 is at least the width of the base, then the letters of the base are
735 evenly distributed across the width of the ruby text.
737 <div class="figure">
738 <p><img class="example" width="145" height="91"
739 alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base"
740 src="images/ra-dl.gif" /><img class="example" width="145" height="91"
741 alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base"
742 src="images/ra-dl-rb.gif" /></p>
743 <p><b>Figure 4.2.6</b>: Distribute-letter ruby alignment</p>
744 </div>
745 </dd>
746 <dt><strong>distribute-space</strong></dt>
747 <dd>If the width of the ruby text is smaller than that of the base, then
748 the ruby text contents are evenly distributed across the width of the
749 base, with a certain amount of white space preceding the first and
750 following the last character in the ruby text. That amount of white
751 space is normally equal to half the amount of inter-character space of
752 the ruby text. If the width of the ruby text is at least the width of
753 the base, then the same type of space distribution applies to the base.
754 In other words, if the base is shorter than the ruby text, the base is
755 distribute-space aligned. This type of alignment
756 is described by [[JLREQ]].
757 <div class="figure">
758 <p><img class="example" width="145" height="91"
759 alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is shorter than base"
760 src="images/ra-ds.gif" /><img class="example" width="145" height="91"
761 alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is longer than base"
762 src="images/ra-ds-rb.gif" /></p>
763 <p><b>Figure 4.2.7</b>: Distribute-space ruby alignment</p>
764 </div>
765 </dd>
766 <dt><strong>line-edge</strong></dt>
767 <dd>If the ruby text is not adjacent to a line edge, it is aligned as in
768 'auto'. If it is adjacent to a line edge, then it is still aligned as in
769 auto, but the side of the ruby text that touches the end of the line is
770 lined up with the corresponding edge of the base. This type of alignment
771 is described by [[JLREQ]]. This type of alignment is
772 relevant only to the scenario where the ruby text is longer than the
773 ruby base. In the other scenarios, this is just 'auto'.
774 <div class="figure">
775 <p><img class="example" width="146" height="109"
776 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base"
777 src="images/ra-le-l.gif" /><img class="example" width="146"
778 height="110"
779 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base"
780 src="images/ra-le-r.gif" /></p>
781 <p><b>Figure 4.2.8</b>: Line edge ruby alignment</p>
782 </div>
783 </dd>
784 </dl>
786 <p>For a complex ruby with spanning elements, one additional consideration is
787 required. If the spanning element spans multiple 'rows' (other rbc or rtc
788 elements), and the ruby alignment requires space distribution among the
789 'spanned' elements, a ratio must be determined among the 'columns' of spanned
790 elements. This ratio is computed by taking into consideration the widest
791 element within each column.</p>
793 <p>In the context of this property, the 'left' and 'right' values are
794 synonymous with the 'start' and 'end' values respectively. I.e. their meaning
795 is relative according to the text layout flow. Most of the other CSS
796 properties interpret 'left' and 'right' on an 'absolute' term. See Appendix A
797 of the <a href="#CSS3TEXT">CSS3 Text Module</a> for further details.</p>
799 <h3 id="rubyover">
800 Ruby overhanging: the 'ruby-overhang' property</h3>
802 <table class="propdef">
803 <tr>
804 <th>Name:
805 <td><dfn>ruby-overhang</dfn>
806 <tr>
807 <th>Value:
808 <td>auto | start | end | none
809 <tr>
810 <th>Initial:
811 <td>none
812 <tr>
813 <th>Applies to:
814 <td>the parent of elements with display: ruby-text
815 <tr>
816 <th>Inherited:
817 <td>yes
818 <tr>
819 <th>Percentages:
820 <td>N/A
821 <tr>
822 <th>Media:
823 <td>visual
824 <tr>
825 <th>Computed value:
826 <td>specified value (except for initial and inherit)
827 </table>
829 <p>This property determines whether, and on which side, ruby text is allowed
830 to partially overhang any adjacent text in addition to its own base, when the
831 ruby text is wider than the ruby base. Note that ruby text is never allowed to
832 overhang glyphs belonging to another ruby base. <span class="issue"><span class="issuehead">Issue: </span> This rule must be broken if we are to allow support for jukugo ruby.</span> Also the user agent is free to assume
833 a maximum amount by which ruby text may overhang adjacent text. The user agent may use
834 the [[JIS4051]] recommendation of using one ruby text character
835 length as the maximum overhang length. Detailed rules for how ruby text can overhang adjacent characters for Japanese are described by [[JLREQ]].</p>
837 <p>Possible values:</p>
838 <dl>
839 <dt><strong>auto</strong></dt>
840 <dd>The ruby text can overhang text adjacent to the base on either side. [[JLREQ]] and [[JIS4051]] specify the categories of characters that
841 ruby text can overhang. The user agent is free to follow those recommendations or specify its own classes of
842 characters to overhang. This is the initial value.
843 <div class="figure">
844 <p><img class="example" width="177" height="91"
845 alt="Diagram of glyph layout in overhanging ruby" src="images/ro-a.gif" /></p>
846 <p><b>Figure 4.3.1</b>: Ruby overhanging adjacent text</p>
847 </div>
848 </dd>
849 <dt><strong>start</strong></dt>
850 <dd>The ruby text can only overhang the text that precedes it. That means, for
851 example, that ruby cannot overhang text that is to the right of it in
852 horizontal LTR layout, and it cannot overhang text that is below it in
853 vertical-ideographic layout.
854 <div class="figure">
855 <p><img class="example" width="199" height="91"
856 alt="Diagram of glyph layout when ruby overhangs the preceding glyphs only"
857 src="images/ro-s.gif" /></p>
858 <p><b>Figure 4.3.2</b>: Ruby overhanging preceding text only</p>
859 </div>
860 </dd>
861 <dt><strong>end</strong></dt>
862 <dd>The ruby text can only overhang the text that follows it. That means, for
863 example, that ruby cannot overhang text that is to the left of it in
864 horizontal LTR layout, and it cannot overhang text that is above it in
865 vertical-ideographic layout.
866 <div class="figure">
867 <p><img class="example" width="198" height="91"
868 alt="Diagram of glyph layout when ruby overhangs the following characters only"
869 src="images/ro-e.gif" /></p>
870 <p><b>Figure 4.3.3</b>: Ruby overhanging following text only</p>
871 </div>
872 </dd>
873 <dt><strong>none</strong></dt>
874 <dd>The ruby text cannot overhang any text adjacent to its base, only its
875 own base.
877 <div class="figure">
878 <p><img class="example" width="220" height="91"
879 alt="Diagram of glyph layout in non-overhanging ruby"
880 src="images/ro-n.gif" /></p>
881 <p><b>Figure 4.3.4</b>: Ruby not allowed to overhang adjacent text</p>
882 </div>
883 </dd>
884 </dl>
886 <h3 id="rubyspan">
887 Ruby annotation spanning: the 'ruby-span' property</h3>
889 <table class="propdef">
890 <tr>
891 <th>Name:
892 <td><dfn>ruby-span</dfn>
893 <tr>
894 <th>Value:
895 <td>attr(x) | none
896 <tr>
897 <th>Initial:
898 <td>none
899 <tr>
900 <th>Applies to:
901 <td>elements with display: ruby-text
902 <tr>
903 <th>Inherited:
904 <td>no
905 <tr>
906 <th>Percentages:
907 <td>N/A
908 <tr>
909 <th>Media:
910 <td>visual
911 <tr>
912 <th>Computed value:
913 <td><number>
914 </table>
916 <p>This property controls the spanning behavior of annotation elements. </p>
918 <p class="note"><span class="note-label">Note:</span> A XHTML user agent may also use the <samp>rbspan</samp>
919 attribute to get the same effect.</p>
921 <p>Possible values:</p>
923 <dl>
924 <dt><strong>attr(x)</strong></dt>
925 <dd>The value of attribute 'x' as a string value. The string value is
926 evaluated as a <number> to determine the number of ruby base elements to be
927 spanned by the annotation element. If the <number> is '0', it is replaced by
928 '1'.The <number> is the computed value. </dd>
929 <dt>none</dt>
930 <dd>No spanning. The computed value is '1'.</dd>
931 </dl>
933 <p>The following example shows an XML example using the 'display' property
934 values associated with the 'ruby structure and the 'ruby-span' property</p>
935 <pre class="xml">myruby { display: ruby; }
936 myrbc { display: ruby-base-container; }
937 myrb { display: ruby-base; }
938 myrtc.before { display: ruby-text-container; ruby-position: before}
939 myrtc.after { display: ruby-text-container; ruby-position: after}
940 myrt { display: ruby-text; ruby-span: attr(rbspan); }
941 ...
942 <myruby>
943 <myrbc>
944 <myrb>10</myrb>
945 <myrb>31</myrb>
946 <myrb>2002</myrb>
947 </myrbc>
948 <myrtc class="before">
949 <myrt>Month</myrt>
950 <myrt>Day</myrt>
951 <myrt>Year</myrt>
952 </myrtc>
953 <myrtc class="after">
954 <myrt rbspan="3">Expiration Date</myrt>
955 </myrtc>
956 </myruby></pre>
958 <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>
960 <h2 id="profiles">
961 Profiles</h2>
963 <p>There are two modules defined by this module:</p>
965 <p>CSS3 Simple Ruby model</p>
967 <p>CSS3 Complex Ruby model.</p>
969 <p>They both contain all the properties specified by this CSS chapter, i.e. <a
970 href="#rubyalign">'ruby-align'</a>, <a href="#rubyover">'ruby-overhang'</a>, <a href="#rubypos">'ruby-position'</a>
971 and <a href="#rubyspan">'ruby-span'</a>. They differ by the required
972 'display' property values. The Simple Ruby model requires the values: 'ruby',
973 'ruby-base' and 'ruby-text'. The Complex Ruby model requires in addition the
974 values: 'ruby-base-container' and 'ruby-text-container'.</p>
976 <h2 id="glossary">
977 Glossary</h2>
978 <dl>
979 <dt><a id="g-bopomofo"><strong><span
980 lang="zh">Bopomofo</span></strong></a></dt>
981 <dd>37 characters and 4 tone markings used as phonetics in Chinese,
982 especially standard Mandarin.</dd>
983 <dt><a id="g-hanja"><strong><span
984 lang="ko">Hanja</span></strong></a></dt>
985 <dd>Subset of the Korean writing system that utilizes ideographic
986 characters borrowed or adapted from the Chinese writing system. Also see
987 <a href="#g-kanji"><span lang="ja">Kanji</span></a>.</dd>
988 <dt><a id="g-hiragana"><strong><span
989 lang="ja">Hiragana</span></strong></a></dt>
990 <dd>Japanese syllabic script, or character of that script. Rounded and
991 cursive in appearance. Subset of the Japanese writing system, used together
992 with kanji and katakana. In recent times, mostly used to write Japanese
993 words when kanji are not available or appropriate, and word endings and
994 particles. Also see <a
995 href="#g-katakana"><span lang="ja">Katakana</span></a>.</dd>
996 <dt><a id="g-ideogram"><strong>Ideograph</strong></a></dt>
997 <dd>A character that is used to represent an idea, word, or word component,
998 in contrast to a character from an alphabetic or syllabic script. The most
999 well-known ideographic script is used (with some variation) in East Asia
1000 (China, Japan, Korea,...).</dd>
1001 <dt><a id="g-kana"><strong><span lang="ja">Kana</span></strong></a></dt>
1002 <dd>Collective term for hiragana and katakana.</dd>
1003 <dt><a id="g-kanji"><strong>Kanji</strong></a></dt>
1004 <dd>Japanese term for ideographs; ideographs used in Japanese. Subset of the
1005 Japanese writing system, used together with hiragana and katakana. Also see <a
1006 href="#g-hanja"><span lang="ko">Hanja</span></a>.</dd>
1007 <dt><a id="g-katakana"><strong><span
1008 lang="ja">Katakana</span></strong></a></dt>
1009 <dd>Japanese syllabic script, or character of that script. Angular in
1010 appearance. Subset of the Japanese writing system, used together with
1011 kanji and hiragana. In recent times, mainly used to write foreign words. Also see <a
1012 href="#g-hiragana"><span lang="ja">Hiragana</span></a>.</dd>
1013 <dt><a id="g-monoruby" name="g-monoruby"><strong>Mono-ruby</strong></a></dt>
1014 <dd>In Japanese typography: Ruby associated with a single character of
1015 the base text.</dd>
1016 <dt><a id="g-ruby"><strong>Ruby</strong></a></dt>
1017 <dd>A run of text that appears in the vicinity of another run of text and
1018 serves as an annotation or a pronunciation guide for that text.</dd>
1019 </dl>
1021 <h2 id="conformance">
1022 Conformance</h2>
1024 <h3 id="conventions">
1025 Document conventions</h3>
1027 <p>Conformance requirements are expressed with a combination of
1028 descriptive assertions and RFC 2119 terminology. The key words “MUST”,
1029 “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
1030 “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
1031 document are to be interpreted as described in RFC 2119.
1032 However, for readability, these words do not appear in all uppercase
1033 letters in this specification.
1035 <p>All of the text of this specification is normative except sections
1036 explicitly marked as non-normative, examples, and notes. [[!RFC2119]]</p>
1038 <p>Examples in this specification are introduced with the words “for example”
1039 or are set apart from the normative text with <code>class="example"</code>,
1040 like this:
1042 <div class="example">
1043 <p>This is an example of an informative example.</p>
1044 </div>
1046 <p>Informative notes begin with the word “Note” and are set apart from the
1047 normative text with <code>class="note"</code>, like this:
1049 <p class="note">Note, this is an informative note.</p>
1051 <h3 id="conformance-classes">
1052 Conformance classes</h3>
1054 <p>Conformance to CSS Ruby Module
1055 is defined for three conformance classes:
1056 <dl>
1057 <dt><dfn title="style sheet!!as conformance class">style sheet</dfn>
1058 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
1059 style sheet</a>.
1060 <dt><dfn>renderer</dfn></dt>
1061 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
1062 that interprets the semantics of a style sheet and renders
1063 documents that use them.
1064 <dt><dfn id="authoring-tool">authoring tool</dfn></dt>
1065 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
1066 that writes a style sheet.
1067 </dl>
1069 <p>A style sheet is conformant to CSS Ruby Module
1070 if all of its statements that use syntax defined in this module are valid
1071 according to the generic CSS grammar and the individual grammars of each
1072 feature defined in this module.
1074 <p>A renderer is conformant to CSS Ruby Module
1075 if, in addition to interpreting the style sheet as defined by the
1076 appropriate specifications, it supports all the features defined
1077 by CSS Ruby Module by parsing them correctly
1078 and rendering the document accordingly. However, the inability of a
1079 UA to correctly render a document due to limitations of the device
1080 does not make the UA non-conformant. (For example, a UA is not
1081 required to render color on a monochrome monitor.)
1083 <p>An authoring tool is conformant to CSS Ruby Module
1084 if it writes style sheets that are syntactically correct according to the
1085 generic CSS grammar and the individual grammars of each feature in
1086 this module, and meet all other conformance requirements of style sheets
1087 as described in this module.
1089 <h3 id="partial">
1090 Partial implementations</h3>
1092 <p>So that authors can exploit the forward-compatible parsing rules to
1093 assign fallback values, CSS renderers <strong>must</strong>
1094 treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore
1095 as appropriate</a>) any at-rules, properties, property values, keywords,
1096 and other syntactic constructs for which they have no usable level of
1097 support. In particular, user agents <strong>must not</strong> selectively
1098 ignore unsupported component values and honor supported values in a single
1099 multi-value property declaration: if any value is considered invalid
1100 (as unsupported values must be), CSS requires that the entire declaration
1101 be ignored.</p>
1103 <h3 id="experimental">
1104 Experimental implementations</h3>
1106 <p>To avoid clashes with future CSS features, the CSS2.1 specification
1107 reserves a <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
1108 syntax</a> for proprietary and experimental extensions to CSS.
1110 <p>Prior to a specification reaching the Candidate Recommendation stage
1111 in the W3C process, all implementations of a CSS feature are considered
1112 experimental. The CSS Working Group recommends that implementations
1113 use a vendor-prefixed syntax for such features, including those in
1114 W3C Working Drafts. This avoids incompatibilities with future changes
1115 in the draft.
1116 </p>
1118 <h3 id="testing">
1119 Non-experimental implementations</h3>
1121 <p>Once a specification reaches the Candidate Recommendation stage,
1122 non-experimental implementations are possible, and implementors should
1123 release an unprefixed implementation of any CR-level feature they
1124 can demonstrate to be correctly implemented according to spec.
1126 <p>To establish and maintain the interoperability of CSS across
1127 implementations, the CSS Working Group requests that non-experimental
1128 CSS renderers submit an implementation report (and, if necessary, the
1129 testcases used for that implementation report) to the W3C before
1130 releasing an unprefixed implementation of any CSS features. Testcases
1131 submitted to W3C are subject to review and correction by the CSS
1132 Working Group.
1134 <p>Further information on submitting testcases and implementation reports
1135 can be found from on the CSS Working Group's website at
1136 <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
1137 Questions should be directed to the
1138 <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
1139 mailing list.
1141 <h2 class=no-num id="acknowledgments">
1142 Acknowledgments</h2>
1144 <p>This specification would not have been possible without the help from:</p>
1146 <p>Stephen Deach, Martin Dürst, Hideki Hiura(<span lang="ja">樋浦 秀樹</span>), Masayasu Ishikawa(<span lang="ja">石川
1147 雅康</span>), Chris
1148 Pratley, Takao Suzuki(<span lang="ja">鈴木 孝雄</span>), Frank Yung-Fong Tang, Chris Thrasher, Masafumi Yabe<span lang="ja">家辺
1149 勝文</span>), Steve Zilles.</p>
1151 <h2 class=no-num id="references">
1152 References</h2>
1154 <h3 class="no-num" id="normative-references">
1155 Normative references</h3>
1156 <!--normative-->
1158 <h3 class="no-num" id="other-references">
1159 Other references</h3>
1160 <!--informative-->
1162 <h2 class="no-num" id="index">
1163 Index</h2>
1164 <!--index-->
1166 <h2 class="no-num" id="property-index">
1167 Property index</h2>
1168 <!-- properties -->
1170 </body>
1171 </html>
1172 <!-- Keep this comment at the end of the file
1173 Local variables:
1174 mode: sgml
1175 sgml-declaration:"~/SGML/HTML4.decl"
1176 sgml-default-doctype-name:"html"
1177 sgml-minimize-attributes:t
1178 sgml-nofill-elements:("pre" "style" "br")
1179 sgml-live-element-indicator:t
1180 sgml-omittag:nil
1181 sgml-shorttag:nil
1182 sgml-namecase-general:t
1183 sgml-general-insert-case:lower
1184 sgml-always-quote-attributes:t
1185 sgml-indent-step:nil
1186 sgml-indent-data:t
1187 sgml-parent-document:nil
1188 sgml-exposed-tags:nil
1189 sgml-local-catalogs:nil
1190 sgml-local-ecat-files:nil
1191 End:
1192 -->