css-ruby/Overview.src.html

Mon, 08 Jul 2013 17:35:34 -0700

author
fantasai <fantasai.cvs@inkedblade.net>
date
Mon, 08 Jul 2013 17:35:34 -0700
changeset 8661
bf6f0366baf4
parent 8561
a79e0e6e4456
child 8662
9bc89e933ad0
permissions
-rw-r--r--

[css-ruby] Add basic layout section.

fantasai@8526 1 <!--
fantasai@8526 2
fantasai@8526 3 Issues:
fantasai@8526 4 bidi
fantasai@8561 5 box layout/sizing
fantasai@8526 6
fantasai@8547 7 Redo all examples with consistent font. (M+ 2p?)
fantasai@8547 8
fantasai@8526 9 -->
fantasai@8526 10
fantasai@8479 11 <!DOCTYPE html>
fantasai@8479 12 <html lang="en">
ishida@1665 13 <head>
fantasai@8493 14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
fantasai@8493 15 <title>CSS Ruby Module Level 1</title>
fantasai@8493 16 <link rel=contents href="#contents">
fantasai@8493 17 <link rel=index href="#index">
fantasai@8493 18 <link rel="stylesheet" type="text/css" href="../default.css">
fantasai@8493 19 <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
fantasai@8493 20 <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
ishida@1665 21 </head>
ishida@1665 22
fantasai@8479 23 <body class="h-entry">
ishida@1665 24
ishida@1665 25 <div class="head">
fantasai@8479 26 <!--logo-->
ishida@1665 27
fantasai@8479 28 <h1 class="p-name">CSS Ruby Module Level 1</h1>
ishida@1665 29
fantasai@8479 30 <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>
ishida@1665 31 <dl>
fantasai@8493 32 <dt>This version:
fantasai@8493 33 <dd><a class="u-url" href="[VERSION]">[VERSION]</a>
fantasai@7857 34
fantasai@8493 35 <dt>Latest version:
fantasai@8493 36 <dd><a href="http://www.w3.org/TR/[SHORTNAME]/">http://www.w3.org/TR/css3-ruby/</a>
fantasai@8479 37
fantasai@8493 38 <dt>Editor's draft:
fantasai@8493 39 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
fantasai@8493 40 (<a href="https://dvcs.w3.org/hg/csswg/log/tip/[SHORTNAME]/Overview.src.html">change log</a>)
fantasai@8479 41
fantasai@8493 42 <dt>Previous version:
fantasai@8493 43 <dd><a href="http://www.w3.org/TR/2011/WD-css3-ruby-20110630/">
fantasai@8493 44 http://www.w3.org/TR/2011/WD-css3-ruby-20110630/</a>
fantasai@8479 45
fantasai@8493 46 <dt>Issue Tracking:</dt>
fantasai@8493 47 <dd><a rel="issues" href="http://www.w3.org/Style/CSS/Tracker/products/FIXME">http://www.w3.org/Style/CSS/Tracker/products/FIXME</a>
fantasai@8479 48
fantasai@8493 49 <dt>Feedback:</dt>
fantasai@8493 50 <dd><a href="mailto:www-style@w3.org?subject=%5BSHORTNAME%5D%20feedback"
fantasai@8493 51 >www-style@w3.org</a>
fantasai@8493 52 with subject line &ldquo;<kbd>[[SHORTNAME]]
fantasai@8493 53 <var>&hellip; message topic &hellip;</var></kbd>&rdquo;
fantasai@8493 54 (<a rel="discussion" href="http://lists.w3.org/Archives/Public/www-style/"
fantasai@8493 55 >archives</a>)
fantasai@8479 56
fantasai@8493 57 <dt>Editors:
fantasai@8493 58 <dd class="p-author h-card vcard">
fantasai@8493 59 <a class="p-name fn u-url url" rel="author"
fantasai@8493 60 href="http://fantasai.inkedblade.net/contact">Elika J. Etemad</a>,
fantasai@8493 61 <a class="p-org org h-org" href="http://www.mozilla.org/">Mozilla</a>
fantasai@8493 62 <dd class="p-author h-card vcard">
fantasai@8493 63 <a class="p-name fn u-url url" rel="author"
fantasai@8493 64 href="mailto:koji.a.ishii@mail.rakuten.com">Koji Ishii</a>,
fantasai@8493 65 <span class="p-org org">Rakuten, Inc.</span>
fantasai@8493 66 <dd class="p-author h-card vcard">
fantasai@8493 67 <a class="p-name fn u-url url" rel="author"
fantasai@8493 68 href="mailto:ishida@w3.org">Richard Ishida</a>,
fantasai@8493 69 <span class="p-org org">W3C</span>
fantasai@8479 70
fantasai@8493 71 <dt>Former editors:
fantasai@8493 72 <dd>Michel Suignard, Microsoft
fantasai@8493 73 <dd>Marcin Sawicki, Microsoft
ishida@1665 74 </dl>
ishida@1665 75
fantasai@8479 76 <!--copyright-->
ishida@1665 77
fantasai@8479 78 <hr title="Separator for header">
ishida@1665 79 </div>
ishida@1665 80
fantasai@8479 81 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
ishida@1665 82
fantasai@8493 83 <p>
fantasai@8493 84 <span class="p-summary">
fantasai@8493 85 “Ruby” are short runs of text alongside the base text,
fantasai@8493 86 typically used in East Asian documents to indicate pronunciation
fantasai@8493 87 or to provide a short annotation.
fantasai@8493 88 This module describes the rendering model and formatting controls
fantasai@8493 89 related to displaying ruby annotations in CSS.
fantasai@8493 90 </span>
fantasai@8493 91
fantasai@8493 92 <a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing
fantasai@8493 93 the rendering of structured documents (such as HTML and XML) on screen, on
fantasai@8493 94 paper, in speech, etc.
ishida@1665 95
fantasai@8479 96 <h2 class="no-num no-toc" id="status">Status of this document</h2>
ishida@1665 97
fantasai@8479 98 <!--status-->
fantasai@8479 99
fantasai@8479 100 <p>The following features are at risk: &hellip;
fantasai@8479 101
fantasai@8479 102 <h2 class="no-num no-toc" id="contents">
fantasai@8479 103 Table of Contents</h2>
fantasai@8479 104
fantasai@8479 105 <!--toc-->
fantasai@8479 106
fantasai@8479 107 <h2 id="intro">
fantasai@8479 108 Introduction</h2>
fantasai@8479 109
fantasai@8493 110 <p><em>This section is not normative.</em>
fantasai@8479 111
fantasai@8479 112 <h3 id="placement">
fantasai@8479 113 Module interactions</h3>
fantasai@8479 114
fantasai@8493 115 <p>This module extends the inline box model of CSS Level 2 [[!CSS21]]
fantasai@8493 116 to support ruby.
fantasai@8479 117
fantasai@8493 118 <p>None of the properties in this module apply to the <code>::first-line</code> or
fantasai@8493 119 <code>::first-letter</code> pseudo-elements.
fantasai@8479 120
fantasai@8479 121 <h3 id="values">
fantasai@8479 122 Values</h3>
fantasai@8479 123
fantasai@8493 124 <p>This specification follows the
fantasai@8493 125 <a href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
fantasai@8493 126 definition conventions</a> from [[!CSS21]]. Value types not defined in
fantasai@8493 127 this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
fantasai@8493 128 Other CSS modules may expand the definitions of these value types: for
fantasai@8493 129 example [[CSS3VAL]], when combined with this module, expands the
fantasai@8493 130 definition of the <var>&lt;length&gt;</var> value type as used in this specification.</p>
fantasai@8493 131
fantasai@8493 132 <p>In addition to the property-specific values listed in their definitions,
fantasai@8493 133 all properties defined in this specification also accept the
fantasai@8493 134 <a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
fantasai@8493 135 keyword as their property value. For readability it has not been repeated
fantasai@8493 136 explicitly.
fantasai@8479 137
fantasai@8479 138 <h3 id="conventions">
fantasai@8479 139 Document conventions</h3>
ishida@1665 140
fantasai@8492 141 <p>Many typographical conventions in East Asian typography depend
fantasai@8492 142 on whether the character rendered is wide (CJK) or narrow (non-CJK).
fantasai@8492 143 There are a number of illustrations in this document
fantasai@8492 144 for which the following legend is used:
ishida@1665 145
fantasai@8492 146 <dl>
fantasai@8492 147 <dt><img alt="Symbolic wide-cell glyph representation" width="39" height="39" src="images/fullwidth.gif">
fantasai@8492 148 <dd>Wide-cell glyph (e.g. Han) that is the <var>n</var>th character in the text run.
fantasai@8492 149 They are typically sized to 50% when used as annotations.
fantasai@8492 150 <dt><img alt="Symbolic narrow-cell glyph representation" width="19" height="39" src="images/halfwidth.gif">
fantasai@8492 151 <dd>Narrow-cell glyph (e.g. Roman) which is the <var>n</var>th glyph in the text run.
fantasai@8526 152 </dl>
ishida@1665 153
fantasai@8492 154 <p>The orientation which the above symbols assume in the diagrams
fantasai@8492 155 corresponds to the orientation that the glyphs they represent
fantasai@8492 156 are intended to assume when rendered by the user agent.
fantasai@8492 157 Spacing between these characters in the diagrams is incidental,
fantasai@8492 158 unless intentionally changed to make a point.
ishida@1665 159
fantasai@8479 160 <h3 id="ruby-def">
fantasai@8479 161 What is ruby?</h3>
ishida@1665 162
fantasai@8492 163 <p><dfn>Ruby</dfn> is the commonly-used name for a run of text
fantasai@8492 164 that appears alongside another run of text (referred to as the “base”)
fantasai@8492 165 and serves as an annotation or a pronunciation guide associated with that run of text.
ishida@1665 166
fantasai@8492 167 <p>The following figures show two examples of Ruby,
fantasai@8492 168 a simple case and one with more complicated structure.
ishida@1665 169
fantasai@8492 170 <div class="example">
fantasai@8492 171 <p>In this first example, a single annotation is used to annotate the base text.
fantasai@8492 172 <div class="figure">
fantasai@8492 173 <p><img src="images/licence.png"
fantasai@8492 174 alt="Example of ruby applied on top of a Japanese expression">
fantasai@8492 175 <p class="caption">Example of ruby used in Japanese (simple case)
fantasai@8492 176 </div>
fantasai@8492 177 <p>In Japanese typography, this case is sometimes called
fantasai@8492 178 <i lang="ja">taigo</i> ruby or group-ruby (per-word ruby),
fantasai@8492 179 because the annotation as a whole is associated
fantasai@8492 180 with multi-character word (as a whole).
fantasai@8492 181 </div>
ishida@1665 182
fantasai@8492 183 <div class="example">
fantasai@8492 184 <p>In this second example,
fantasai@8492 185 two levels of annotations are attached to a base sequence:
fantasai@8492 186 the hiragana characters on top refer to the pronunciation of each of the base kanji characters,
fantasai@8492 187 while the words “Keio” and “University” on the bottom are annotations describing the English translation.
fantasai@8492 188 <div class="figure">
fantasai@8492 189 <p><img src="images/ruby-univ.gif"
fantasai@8492 190 alt="Example showing complex ruby with annotation text over and under the base characters">
fantasai@8492 191 <p class="caption">Complex ruby with annotation text over and under the base characters
fantasai@8492 192 </div>
fantasai@8492 193 <p>
fantasai@8492 194 <p>Notice that to allow correct association between the hiragana characters and
fantasai@8492 195 their corresponding Kanji base characters,
fantasai@8492 196 the spacing between these Kanji characters is adjusted.
fantasai@8492 197 (This happens around the fourth Kanji character in the figure above.)
fantasai@8492 198 To avoid variable spacing between the Kanji characters in the example above
fantasai@8492 199 the hiragana annotations can be styled as a <i>collapsed annotation</i>,
fantasai@8492 200 which will look more like the group-ruby example earlier.
fantasai@8492 201 However because the base-annotation pairings are recorded in the ruby structure,
fantasai@8492 202 if the text breaks across lines, the annotation characters will stay
fantasai@8492 203 correctly paired with their respective base characters.
fantasai@8492 204 </div>
ishida@1665 205
fantasai@8526 206 <p><i>Ruby</i> formatting as used in Japanese is described in JIS X-4051 [[JIS4051]] (in Japanese)
fantasai@8492 207 and in Requirements for Japanese Text Layout [[JLREQ]] (in English and Japanese)].
fantasai@8492 208 In HTML, ruby structure and markup to represent it is described
fantasai@8492 209 in the Ruby Markup Extension specification.
fantasai@8492 210 This module describes the CSS rendering model
fantasai@8492 211 and formatting controls relevant to ruby layout of such markup.
ishida@1665 212
fantasai@8479 213 <h2 id="ruby-model">
fantasai@8479 214 Ruby Formatting Model</h2>
ishida@1665 215
fantasai@8492 216 <p>The CSS ruby model is based on
fantasai@8492 217 the <a href="http://darobin.github.io/html-ruby/">HTML Ruby Markup Extension</a>
fantasai@8492 218 and <a href="http://www.w3.org/TR/ruby/">XHTML Ruby Annotation Recommendation</a> [[RUBY]].
fantasai@8492 219 In this model, a ruby structure consists of
fantasai@8492 220 one or more <dfn>ruby base</dfn> elements representing the base (annotated) text,
fantasai@8492 221 associated with one or more levels of <dfn>ruby annotation</dfn> elements representing the annotations.
fantasai@8492 222 The structure of ruby is similar to that of a table:
fantasai@8492 223 there are “rows” (the base text level, each annotation level)
fantasai@8492 224 and “columns” (each <i>ruby base</i> and its corresponding <i>ruby annotations</i>).
ishida@1665 225
fantasai@8492 226 <p>Consecutive bases and annotations are grouped together into <dfn>ruby segments</dfn>.
fantasai@8492 227 Within a <i>ruby segment</i>, a <i>ruby annotation</i> may span multiple <i>ruby bases<i>.
ishida@1665 228
fantasai@8492 229 <p class="note">In HTML, a single <code>&lt;ruby&gt;</code> element may contain multiple <i>ruby segments</i>.
fantasai@8492 230 (In the XHTML Ruby model, a single <code>&lt;ruby&gt;</code> element can only contain one <i>ruby segment</i>.)
ishida@1665 231
fantasai@8492 232 <h3 id="ruby-display">
fantasai@8492 233 Ruby-specific 'display' property values</h3>
ishida@1665 234
fantasai@8492 235 <p>For document languages (such as XML applications) that do not have pre-defined ruby elements,
fantasai@8492 236 authors must map document language elements to ruby elements;
fantasai@8492 237 this is done with the 'display' property.
fantasai@8492 238
fantasai@8492 239 <table class="propdef">
fantasai@8492 240 <tr>
fantasai@8492 241 <th>Name:
fantasai@8492 242 <td>display
fantasai@8492 243 <tr>
fantasai@8492 244 <th><a href="#values">New Values</a>:
fantasai@8492 245 <td>ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container
fantasai@8492 246 </table>
fantasai@8492 247
fantasai@8492 248 <p>The following new 'display' values assign ruby layout roles to an arbitrary element:
fantasai@8492 249
fantasai@8492 250 <dl>
fantasai@8492 251 <dt>''ruby''
fantasai@8504 252 <dd>Specifies that an element generates a <dfn title="ruby container | ruby container box">ruby container box</dfn>.
fantasai@8492 253 (Corresponds to HTML/XHTML <code>&lt;ruby&gt;</code> elements.)
fantasai@8492 254 <dt>''ruby-base''
fantasai@8504 255 <dd>Specifies that an element generates a <dfn title="ruby base box | ruby base">ruby base box</dfn>.
fantasai@8492 256 (Corresponds to HTML/XHTML <code>&lt;rb&gt;</code> elements.)
fantasai@8492 257 <dt>''ruby-text''
fantasai@8504 258 <dd>Specifies that an element generates a <dfn title="ruby annotation box | ruby annotation">ruby annotation box</dfn>.
fantasai@8492 259 (Corresponds to HTML/XHTML <code>&lt;rt&gt;</code> elements.)
fantasai@8492 260 <dt>''ruby-base-container''
fantasai@8504 261 <dd>Specifies that an element generates a <dfn title="ruby base container box | ruby base container">ruby base container box</dfn>.
fantasai@8492 262 (Corresponds to XHTML <code>&lt;rbc&gt;</code> elements; always implied in HTML.)
fantasai@8492 263 <dt>''ruby-text-container''
fantasai@8504 264 <dd>Specifies that an element generates a <dfn title="ruby annotation container box | ruby annotation container">ruby annotation container box</dfn>.
fantasai@8492 265 (Corresponds to HTML/XHTML <code>&lt;ruby&gt;</code> elements.)
fantasai@8492 266 </dl>
fantasai@8492 267
fantasai@8504 268 <h3 id="box-fixup">
fantasai@8504 269 Anonymous Ruby Box Generation</h3>
fantasai@8504 270
fantasai@8492 271 <p>The CSS model does not require that the document language
fantasai@8492 272 include elements that correspond to each of these components.
fantasai@8504 273 Missing parts of the structure are implied through the anonymous box generation rules
fantasai@8504 274 <a href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes">similar to those used to normalize tables</a>. [[!CSS21]]
fantasai@8492 275
fantasai@8504 276 <ol>
fantasai@8504 277 <li>Any in-flow block-level boxes directly contained by a
fantasai@8504 278 <i>ruby container</i>,
fantasai@8504 279 <i>ruby base container</i>,
fantasai@8504 280 <i>ruby annotation container</i>,
fantasai@8504 281 <i>ruby base box</i>,
fantasai@8504 282 or <i>ruby annotation box</i>
fantasai@8504 283 are forced to be inline-level boxes,
fantasai@8504 284 and their 'display' value computed accordingly.
fantasai@8504 285 For example,
fantasai@8504 286 the 'display' property of an in-flow element with ''display: block''
fantasai@8504 287 parented by an element with ''display: ruby-text''
fantasai@8504 288 computes to ''inline-block''.
fantasai@8504 289 This computation occurs after any intermediary anonymous-box fixup
fantasai@8504 290 (such as that required by internal table elements).
fantasai@8504 291
fantasai@8504 292 <li>Any consecutive sequence of <i>ruby bases</i> not parented by a <i>ruby base container</i>
fantasai@8504 293 is wrapped in an anonymous <i>ruby base container</i>.
fantasai@8504 294 Similarly, any consecutive sequence of <i>ruby annotations</i> not parented by a <i>ruby annotation container</i>
fantasai@8504 295 is wrapped in an anonymous <i>ruby annotation container</i>.
fantasai@8504 296
fantasai@8504 297 <li>Within each <i>ruby base container</i>,
fantasai@8504 298 each sequence of inline-level boxes is wrapped in an anonymous <i>ruby base box</i>.
fantasai@8504 299 Similarly, within each <i>ruby annotation container</i>,
fantasai@8504 300 each sequence of inline-level boxes is wrapped in an anonymous <i>ruby annotation box</i>.
fantasai@8504 301
fantasai@8504 302 <li>A sequence of <i>ruby base containers</i> and/or <i>ruby annotation containers</i>
fantasai@8504 303 not parented by a <i>ruby container</i>
fantasai@8504 304 is wrapped in an anonymous <i>ruby container</i>.
fantasai@8504 305 </ol>
fantasai@8504 306
fantasai@8504 307 <p>At this point, all ruby layout structures are properly parented,
fantasai@8504 308 and the UA can start to associate bases with their annotations.
fantasai@8504 309
fantasai@8504 310 <p class="note">
fantasai@8504 311 Note that the UA is not required to create any of these anonymous boxes in its internal structures,
fantasai@8504 312 as long as pairing and layout behaves as if they existed.
fantasai@8504 313
fantasai@8504 314 <h3 id="pairing">
fantasai@8504 315 Ruby Pairing and Annotation Levels</h3>
fantasai@8504 316
fantasai@8504 317 <p>Within a ruby structure,
fantasai@8661 318 each <i>ruby base</i> is associated with <i>ruby annotations</i>
fantasai@8504 319 and vice versa.
fantasai@8504 320 A <i>ruby base</i> can be associated with at most one <i>ruby annotation</i> per annotation level.
fantasai@8504 321 If there are multiple annotation levels, it can therefore be associated with multiple <i>ruby annotations</i>.
fantasai@8504 322 A <i>ruby annotation</i> is associated with one or more <i>ruby bases</i>;
fantasai@8504 323 annotations can span multiple bases.
fantasai@8504 324
fantasai@8504 325 <p><dfn>Annotation pairing</dfn> is the process of associating
fantasai@8504 326 <i>ruby annotations</i> with <i>ruby bases</i>.
fantasai@8504 327
fantasai@8504 328 <ol>
fantasai@8504 329 <li>
fantasai@8504 330 <p>First, the ruby structure is divided into <i>ruby segments</i>,
fantasai@8504 331 each consisting of a single <i>ruby base container</i>
fantasai@8504 332 followed by one or more <i>ruby annotation containers</i>.
fantasai@8504 333 If the first child of a <i>ruby container</i> is a <i>ruby annotation container</i>,
fantasai@8504 334 an anonymous, empty <i>ruby base container</i> is assumed to exist before it.
fantasai@8504 335 Similarly, if the <i>ruby container</i> contains consecutive <i>ruby base containers</i>,
fantasai@8504 336 anonymous, empty <i>ruby annotation containers</i> are assumed to exist between them.
fantasai@8504 337 The <i>ruby base container</i> in each segment is thus associated
fantasai@8504 338 with each of the <i>ruby annotation containers</i> in that segment.
fantasai@8504 339
fantasai@8504 340 <p>Each <i>ruby annotation containers</i> in a <i>ruby segment</i>
fantasai@8504 341 represents one <dfn title="annotation level | level">level</dfn> of annotation:
fantasai@8504 342 the first one represents the first level of annotation,
fantasai@8504 343 the second one represents the second level of annotation,
fantasai@8504 344 and so on.
fantasai@8504 345
fantasai@8504 346 <li>Within each <i>ruby segment</i>,
fantasai@8504 347 each <i>ruby base box</i> in the <i>ruby base container</i>
fantasai@8504 348 is paired with one <i>ruby annotation box</i>
fantasai@8504 349 from each <i>ruby annotation container</i> in its <i>ruby segment</i>.
fantasai@8504 350 If there are not enough <i>ruby annotations</i> in a <i>ruby annotation container</i>,
fantasai@8504 351 the last one is associated with any excess <i>ruby bases</i>.
fantasai@8504 352 (If there are not any in the <i>ruby annotation container</i>, an anonymous empty one is assumed to exist.)
fantasai@8504 353 If there are not enough <i>ruby bases</i>,
fantasai@8504 354 any remaining <i>ruby annotations</i> are assumed to be associated
fantasai@8504 355 with empty, anonymous bases inserted at the end of the <i>ruby base container</i>.
fantasai@8506 356
fantasai@8506 357 <p>If an implementation supports ruby markup with explicit spanning
fantasai@8506 358 (e.g. XHTML Complex Ruby Annotations),
fantasai@8506 359 it must adjust the pairing rules to pair spanning annotations to multiple bases
fantasai@8506 360 appropriately.
fantasai@8504 361 </ol>
fantasai@8504 362
fantasai@8504 363 <p>A this point, ruby “columns” are defined,
fantasai@8504 364 each represented by a single <i>ruby base</i>
fantasai@8504 365 and associated with one <i>ruby annotation</i> (possibly an empty, anonymous one)
fantasai@8504 366 from each <i>annotation level</i>.
fantasai@8504 367
fantasai@8504 368 <h4 id="nested-pairing">
fantasai@8504 369 Nested Ruby</h4>
fantasai@8504 370
fantasai@8504 371 <p>When <i>ruby containers</i> are nested,
fantasai@8504 372 pairing begins with the deepest <i>ruby container</i>,
fantasai@8504 373 then expands out,
fantasai@8504 374 treating each <i>ruby container</i> nested within another <i>ruby container</i>
fantasai@8504 375 as a <i>ruby base</i>,
fantasai@8504 376 and associating each <i>ruby annotation</i>
fantasai@8504 377 associated with the nested <i>ruby container</i>
fantasai@8504 378 as being associated with (spanning) all of its <i>ruby bases</i>.
fantasai@8504 379
fantasai@8504 380 <p>Using nested <i>ruby containers</i> thus allows the representation
fantasai@8504 381 of complex spanning relationships.
fantasai@8504 382
fantasai@8504 383 <p class="issue">This shouldn't belong in Level 1. But HTML5 allows it, so we have to handle it. Yay HTML5.
fantasai@8504 384
fantasai@8547 385 <h3 id="autohide">
fantasai@8547 386 Autohiding Annotations</h3>
fantasai@8547 387
fantasai@8547 388 <p>If a <i>ruby annotation</i> has the exact same content as its base,
fantasai@8547 389 it is <dfn title="hidden ruby annotation | hidden annotation">hidden</dfn>.
fantasai@8547 390 Hiding a <i>ruby annotation</i> does not affect annotation pairing
fantasai@8547 391 or the block-axis positioning of boxes in other <i>levels</i>.
fantasai@8547 392 However the <i>hidden annotation</i> is not visible,
fantasai@8547 393 and it has no impact on layout
fantasai@8547 394 other than to separate adjacent sequences of <i>ruby annotation boxes</i> within its level,
fantasai@8547 395 as if they belonged to separate segments
fantasai@8547 396 and the <i>hidden annotation</i>’s base were not a <i>ruby base</i> but an intervening inline.
fantasai@8547 397
fantasai@8547 398 <div class="example">
fantasai@8547 399 <p>This is to allow correct inlined display of annotations
fantasai@8547 400 for Japanese words that are a mix of kanji and hirangana.
fantasai@8547 401 For example, the word <i>振り仮名</i> should be inlined as
fantasai@8547 402 <p class="figure">振り仮名(ふりがな)
fantasai@8547 403 <p>and therefore marked up as
fantasai@8547 404 <pre>
fantasai@8547 405 <!-- -->&lt;ruby>
fantasai@8547 406 <!-- --> &lt;rb>振&lt;/rb>&lt;rb>り&lt;/rb>&lt;rb>仮&lt;/rb>&lt;rb>名&lt;/rb>
fantasai@8547 407 <!-- --> &lt;rp>(&lt;/rp>&lt;rt>ふ&lt;/rt>&lt;rt>り&lt;/rt>&lt;rt>が&lt;/rt>&lt;rt>な&lt;/rt>&lt;rp>)&lt;/rp>
fantasai@8547 408 <!-- -->&lt;ruby></pre>
fantasai@8547 409 <p>However, when displayed as ruby, the “り” should be hidden
fantasai@8547 410 <div class="figure">
fantasai@8547 411 <p><img src="images/furigana-separate.png"
fantasai@8547 412 alt="Hiragana annotations for 振り仮名 appear, each above its base character.">
fantasai@8547 413 <p class="caption">Hiragana ruby for 振り仮名
fantasai@8547 414 </div>
fantasai@8547 415 </div>
fantasai@8547 416
fantasai@8547 417 <p class="note">
fantasai@8547 418 Future levels of CSS Ruby may add controls for this,
fantasai@8547 419 however in this level it is always forced.
fantasai@8547 420
fantasai@8547 421 <p>The content comparison for this auto-hiding behavior
fantasai@8547 422 takes place prior to white space collapsing.
fantasai@8547 423 <span class="issue">Is this easier? Or after collapsing is easier? We should do whatever is easier, as it really doesn't matter much which way to go.
fantasai@8547 424
fantasai@8534 425 <h3 id="white-space">
fantasai@8534 426 White Space</h3>
fantasai@8534 427
fantasai@8534 428 <p class="issue">I'm unsure exactly where space should be trimmed. :/
fantasai@8534 429 But pretty sure we need to keep spaces between things,
fantasai@8534 430 otherwise ruby only works for CJK.
fantasai@8534 431
fantasai@8534 432 <p><i>Collapsible</i> white space within a ruby structure is discarded
fantasai@8534 433 at the beginning and end of a <i>ruby container</i>,
fantasai@8534 434 and at the beginning/end of a <i>ruby annotation box</i> or <i>ruby base box</i> if white space is not its only contents.
fantasai@8534 435 Between <i>ruby segments</i>, between <i>ruby bases</i>, and between <i>ruby annotations</i>, however,
fantasai@8534 436 white space is not discarded.
fantasai@8534 437 If such white space is <i>collapsible</i>, it will collapse
fantasai@8661 438 following the standard <a href="http://www.w3.org/TR/css3-text/#white-space-rules">white space processing rules</a>. [[!CSS3TEXT]]
fantasai@8534 439 Between <i>ruby segments</i>, however,
fantasai@8534 440 the contextual text for determining collapsing behavior is given by the <i>ruby bases</i> on either side,
fantasai@8534 441 not the text on either side of the white space in the source document.
fantasai@8534 442
fantasai@8534 443 <div class="note">
fantasai@8534 444 <p>Note that the white space processing rules
fantasai@8534 445 cause a white space sequence containing a <i>segment break</i> (such as a line feed)
fantasai@8534 446 to <a href="http://www.w3.org/TR/css3-text/#line-break-transform">collapse to nothing</a> between CJK characters.
fantasai@8534 447 This means that CJK ruby can safely use white space for indentation of the ruby markup.
fantasai@8534 448 For example, the following markup will display without any spaces:
fantasai@8534 449 <pre>
fantasai@8534 450 <!-- -->&lt;ruby>
fantasai@8534 451 <!-- --> &lt;rb>東&lt;/rb>&lt;rb>京&lt;/rb>
fantasai@8534 452 <!-- --> &lt;rt>とう&lt;/rt>&lt;rt>きょう&lt;/rt>
fantasai@8534 453 <!-- -->&lt;/ruby></pre>
fantasai@8534 454 <p>However, this markup will:
fantasai@8548 455 <pre>
fantasai@8534 456 <!-- -->&lt;ruby>
fantasai@8534 457 <!-- --> &lt;rb>東&lt;/rb> &lt;rb>京&lt;/rb>
fantasai@8534 458 <!-- --> &lt;rt>とう&lt;/rt> &lt;rt>きょう&lt;/rt>
fantasai@8534 459 <!-- -->&lt;/ruby></pre>
fantasai@8534 460 </div>
fantasai@8534 461
fantasai@8534 462 <p>Any preserved white space is then wrapped in an anonymous box belonging to
fantasai@8534 463 the <i>ruby base container</i> (if between <i>ruby bases</i>),
fantasai@8534 464 <i>ruby annotation container</i> (if between <i>ruby annotations</i>),
fantasai@8534 465 or <i>ruby container</i> (if between <i>ruby segments</i>).
fantasai@8534 466 In the latter case, the text is considered part of the <i>base level</i>.
fantasai@8534 467 This box does not take part in pairing.
fantasai@8534 468 It merely ensures separation between adjacent bases/annotations.
fantasai@8534 469
fantasai@8534 470 <div class="example">
fantasai@8534 471 <p>These rules allow ruby to be used with space-separated scripts such as Latin.
fantasai@8534 472 For example,
fantasai@8534 473 <pre>
fantasai@8534 474 <!-- -->&lt;ruby>
fantasai@8534 475 <!-- --> &lt;rb>W&lt;/rb>&lt;rb>W&lt;/rb>&lt;rb>W&lt;/rb>
fantasai@8534 476 <!-- --> &lt;rt>World&lt;/rt> &lt;rt>Wide&lt;/rt> &lt;rt>Web&lt;/rt>
fantasai@8534 477 <!-- -->&lt;/ruby></pre>
fantasai@8534 478 <p>They also ensure that annotated white space is preserved. For example,
fantasai@8534 479 <pre>
fantasai@8534 480 <!-- -->&lt;ruby>
fantasai@8534 481 <!-- --> &lt;rb>Aerith&lt;/rb>&lt;rb> &lt;/rb>&lt;rb>Gainsboro&lt;/rb>
fantasai@8534 482 <!-- --> &lt;rt>エアリス&lt;/rt>&lt;rt>・&lt;/rt>&lt;rt>ゲインズブール&lt;/rt>
fantasai@8534 483 <!-- -->&lt;/ruby></pre>
fantasai@8534 484 </div>
fantasai@8534 485
fantasai@8534 486 <p class="issue">Specify how this impacts layout, or not.
fantasai@8534 487
fantasai@8661 488 <h3 id="ruby-layout">
fantasai@8661 489 Ruby layout</h3>
fantasai@8661 490
fantasai@8661 491 <p>When a ruby structure is laid out,
fantasai@8661 492 its base level is laid out on the line,
fantasai@8661 493 aligned according to its 'vertical-align' property
fantasai@8661 494 exactly as if it were a regular sequence of <i>inline</i> boxes.
fantasai@8661 495 Each <i>ruby base container</i> is sized and positioned
fantasai@8661 496 to contain exactly the full height of its <i>ruby bases</i>.
fantasai@8661 497
fantasai@8661 498 <p><i>Ruby annotations</i> associated with the base level
fantasai@8661 499 are then positioned with respect to their <i>ruby base boxes</i>
fantasai@8661 500 according to the applicable 'ruby-position' values.
fantasai@8661 501 <i>Ruby annotations</i> within a level (within a single <i>ruby container</i>)
fantasai@8661 502 are aligned to each other as if they were inline boxes
fantasai@8661 503 participating in the same inline formatting context.
fantasai@8661 504 Each <i>ruby annotation container</i> is sized and positioned
fantasai@8661 505 to contain exactly the full height of its <i>ruby annotations</i>.
fantasai@8661 506
fantasai@8661 507 <p>A ruby container (or fragment thereof)
fantasai@8661 508 measures as wide as the content of its widest level.
fantasai@8661 509 (In the case of ''inter-character'' annotations,
fantasai@8661 510 they are spliced in and measured as part of the base level.)
fantasai@8661 511 Similarly, <i>ruby base boxes</i> and <i>ruby annotation boxes</i>
fantasai@8661 512 within a ruby “column” have the measure of the widest content in that “column”.
fantasai@8661 513 In the case of spanning <i>annotations</i>
fantasai@8661 514 (whether actual spanning or pretending to span per 'ruby-collapse'),
fantasai@8661 515 the measures of the <i>ruby annotation box</i> and
fantasai@8661 516 the sum of its associated <i>ruby base boxes</i> must match.
fantasai@8661 517
fantasai@8661 518 <p>How the extra space is distributed
fantasai@8661 519 when ruby content is narrower than the measure of its box
fantasai@8661 520 is specified by the 'ruby-align' property.
fantasai@8661 521
fantasai@8534 522 <h3 id="line-breaking">
fantasai@8533 523 Ruby box and line breaking</h3>
fantasai@8504 524
fantasai@8533 525 <p>When there is not enough space for an entire <i>ruby container</i> to fit on the line,
fantasai@8533 526 the ruby may be broken wherever all levels allow a break.
fantasai@8533 527 In typical cases, line breaks are forbidden within each <i>ruby base</i> and <i>ruby annotation</i>,
fantasai@8533 528 so the <i>ruby container</i> can only break between adjacent <i>ruby bases</i>,
fantasai@8533 529 and only if no <i>ruby annotations</i> span those <i>ruby bases</i>.
fantasai@8533 530 Whenever ruby breaks across lines, <i>ruby annotations</i>
fantasai@8533 531 <em>must</i> stay with their respective bases.
ishida@1665 532
fantasai@8533 533 <div class="figure">
fantasai@8533 534 <p><img src="images/r-break-a.gif"
fantasai@8533 535 alt="Diagram showing the line breaking opportunity in a complex ruby">
fantasai@8533 536 <p class="caption">Ruby line breaking opportunity
fantasai@8533 537 </div>
ishida@1665 538
fantasai@8533 539 <p>Whether ruby can break between two adjacent <i>ruby bases</i>
fantasai@8533 540 is controlled by normal line-breaking rules for the affected text,
fantasai@8533 541 exactly as if the <i>ruby bases</i> were regular <i>inline</i> boxes.
fantasai@8533 542
fantasai@8533 543 <div class="example">
fantasai@8533 544 <p>For example, if two adjacent ruby bases are “蝴” and “蝶”,
fantasai@8533 545 the line may break between them,
fantasai@8533 546 because lines are normally allowed to break between two Han characters.
fantasai@8533 547 However, if 'word-break' is ''keep-all'', that line break is forbidden.
fantasai@8533 548 </div>
fantasai@8533 549
fantasai@8533 550 <p>Inter-base white space is significant for evaluating line break opportunities between <i>ruby bases</i>.
fantasai@8533 551 As with white space between inlines, it collapses when the line breaks there.
fantasai@8533 552
fantasai@8533 553 <div class="example">
fantasai@8533 554 <p>For example, given the following markup:
fantasai@8533 555 <pre>&lt;ruby>&lt;rb>one&lt;/rb> &lt;rb>two&lt;/rb> &lt;rt>1&lt;/rt> &lt;rt>2&lt;/rt>&lt;/ruby></pre>
fantasai@8533 556 <p>Due to the space, the line may break between “one” and “two“.
fantasai@8533 557 If the line breaks there, that space disappears,
fantasai@8533 558 in accordance with standard CSS white space processing rules. [[CSS3-TEXT]]
fantasai@8533 559 </div>
fantasai@8533 560
fantasai@8533 561 <p>The line <em>must not</em> break between a <i>ruby base</i> and its annotations.
fantasai@8533 562
fantasai@8533 563 <div class="figure">
fantasai@8533 564 <img src="images/r-break-b.gif"
fantasai@8533 565 alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
fantasai@8533 566 <p class="caption">''inter-character'' ruby line breaking opportunity
fantasai@8533 567 </div>
fantasai@8533 568
fantasai@8548 569 <h3 id="line-height">
fantasai@8479 570 Ruby box and line stacking</h3>
ishida@1665 571
fantasai@8548 572 <p>The 'line-height' property controls spacing between lines in CSS.
fantasai@8548 573 When inline content on line is shorter than the 'line-height',
fantasai@8548 574 half-leading is added on either side of the content,
fantasai@8548 575 as specificed in <a href="http://www.w3.org/TR/CSS21/visudet.html#line-height">CSS2.1&sect;10.8</a>. [[!CSS21]]
ishida@1665 576
fantasai@8548 577 <p>In order to ensure consistent spacing of lines,
fantasai@8548 578 documents with ruby typically ensure that the 'line-height' is large enough
fantasai@8548 579 to accommodate ruby between lines of text.
fantasai@8548 580 Therefore, ordinarily, <i>ruby annotation containers</i> and <i>ruby annotation boxes</i>
fantasai@8548 581 do not contribute to the measured height of a line's inline contents;
fantasai@8548 582 any alignment (see 'vertical-align') and line-height calculations
fantasai@8548 583 are performed using only the <i>ruby base container</i>,
fantasai@8548 584 exactly as if it were a normal inline.
fantasai@8548 585
fantasai@8548 586 <p>However, if the 'line-height' specified on the <i>ruby container</i>
fantasai@8548 587 is less than the distance between
fantasai@8548 588 the top of the top <i>ruby annotation container</i>
fantasai@8548 589 and the bottom of the bottom <i>ruby annotation container</i>,
fantasai@8548 590 then additional leading is added
fantasai@8548 591 on the appropriate side of the <i>ruby base container</i>
fantasai@8548 592 such that if a block consisted of three lines
fantasai@8548 593 each containing ruby identical to this,
fantasai@8548 594 none of the <i>ruby containers</i> would overlap.
fantasai@8548 595
fantasai@8548 596 <p class="note">Note that this does not ensure that the <i>ruby annotations</i> remain within the line box.
fantasai@8548 597 It merely ensures that <em>if all lines had equal spacing</em>
fantasai@8548 598 and equivalent amounts and positioning of <i>ruby annotations</i>,
fantasai@8548 599 there would be enough room to avoid overlap.
fantasai@8548 600
fantasai@8548 601 <p>Authors should ensure appropriate 'line-height' and 'padding' to accommodate ruby,
fantasai@8548 602 and be particularly careful at the beginning or end of a block
fantasai@8548 603 and when a line contains inline-level content
fantasai@8548 604 (such as images, inline blocks, or elements shifted with 'vertical-align')
fantasai@8548 605 taller than the paragraph's default font size.
fantasai@8548 606
fantasai@8548 607 <div class="figure">
fantasai@8548 608 <p><img src="images/rlh-a.gif"
fantasai@8548 609 alt="The content of each line sits in the middle of its line height;
fantasai@8548 610 the additional space on each side is called half-leading.
fantasai@8548 611 Ruby fits between lines if it is smaller than twice the half-leading,
fantasai@8548 612 but this means that it occupies space belonging to the half-leading of the previous line.">
fantasai@8548 613 <p class="caption">Ruby annotations will often overflow the line;
fantasai@8548 614 authors should ensure content over/under a ruby-annotated line
fantasai@8548 615 is adequately spaced to leave room for the ruby.
fantasai@8548 616 </div>
fantasai@8548 617
fantasai@8548 618 <p class="note">More control over how ruby affects alignment and line layout
fantasai@8548 619 will be part of the CSS Line Layout Module Level 3.
fantasai@8548 620 Note, it is currently in the process of being rewritten;
fantasai@8548 621 the current drafts should not be relied upon.
ishida@1665 622
fantasai@8479 623 <h2 id="ruby-props">
fantasai@8479 624 Ruby Properties</h2>
ishida@1665 625
fantasai@8526 626 <p>The following properties are introduced to control ruby positioning and alignment.
fantasai@8526 627
fantasai@8479 628 <h3 id="rubypos">
fantasai@8479 629 Ruby positioning: the 'ruby-position' property</h3>
ishida@1665 630
kojiishi@8496 631 <table class="propdef">
kojiishi@8496 632 <tr>
kojiishi@8496 633 <th>Name:
kojiishi@8496 634 <td><dfn>ruby-position</dfn>
kojiishi@8496 635 <tr>
kojiishi@8496 636 <th><a href="#values">Value</a>:
kojiishi@8496 637 <td>[ over | under | inter-character ] && [ right | left ]
kojiishi@8496 638 <tr>
kojiishi@8496 639 <th>Initial:
kojiishi@8496 640 <td>over right
kojiishi@8496 641 <tr>
kojiishi@8496 642 <th>Applies to:
fantasai@8526 643 <td>ruby annotation containers
kojiishi@8496 644 <tr>
kojiishi@8496 645 <th>Inherited:
kojiishi@8496 646 <td>yes
kojiishi@8496 647 <tr>
kojiishi@8496 648 <th>Percentages:
kojiishi@8496 649 <td>N/A
kojiishi@8496 650 <tr>
kojiishi@8496 651 <th>Media:
kojiishi@8496 652 <td>visual
kojiishi@8496 653 <tr>
kojiishi@8496 654 <th>Computed value:
fantasai@8526 655 <td>specified value
kojiishi@8496 656 <tr>
kojiishi@8496 657 <th>Animatable:
kojiishi@8496 658 <td>no
kojiishi@8496 659 <tr>
kojiishi@8496 660 <th>Canonical order:
kojiishi@8496 661 <td><abbr title="follows order of property value definition">per grammar</abbr>
kojiishi@8496 662 </table>
fantasai@8526 663
fantasai@8526 664 <p>This property controls position of the ruby text with respect to its base.
fantasai@8526 665 Values have the following meanings:
fantasai@8526 666
kojiishi@8496 667 <p class="issue"><span class="issuehead">Issue-107:&nbsp;</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=&amp;hdr-1-name=subject&amp;hdr-1-query=ruby-position%3A+undesirable+default+value+%27before%27+for+complex+ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=www-style&amp;resultsperpage=20&amp;sortby=date">this thread</a> and <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=Styling+of+complex+Ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core&amp;resultsperpage=20&amp;sortby=date">this one</a>.</p>
kojiishi@8496 668 <dl>
fantasai@8526 669 <dt><dfn title="ruby-position:over">''over''</dfn>
fantasai@8526 670 <dd>The ruby text appears <i>over</i> the base in horizontal text.
ishida@1665 671
kojiishi@8496 672 <div class="figure">
fantasai@8526 673 <p><img src="images/shinkansen-top.gif"
fantasai@8526 674 alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing above the base">
fantasai@8526 675 <p class="caption">Ruby over Japanese base text in horizontal layout
kojiishi@8496 676 </div>
kojiishi@8496 677 </dd>
ishida@1665 678
fantasai@8526 679 <dt><dfn title="ruby-position:right">''right''</dfn>
kojiishi@8496 680 <dd>The ruby text appears on the right side of the base in vertical text.
kojiishi@8496 681 <div class="figure">
fantasai@8526 682 <p><img src="images/shinkansen-right.gif" width="33"
fantasai@8526 683 alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the right of the base">
fantasai@8526 684 <p class="caption">Ruby to the right of Japanese base text in vertical layout
kojiishi@8496 685 </div>
kojiishi@8496 686 </dd>
ishida@1665 687
fantasai@8526 688 <dt><dfn title="ruby-position:under">''under''</dfn>
kojiishi@8496 689 <dd>The ruby text appears under the base in horizontal text.
kojiishi@8496 690 This is a relatively rare setting used in ideographic East Asian writing systems,
kojiishi@8496 691 most easily found in educational text.
ishida@1665 692
kojiishi@8496 693 <div class="figure">
fantasai@8526 694 <p><img src="images/shinkansen-bottom.gif"
fantasai@8526 695 alt="Diagram of ruby glyph layout in horizontal mode with ruby text appearing below the base">
fantasai@8526 696 <p class="caption">Ruby under Japanese base text in horizontal layout
kojiishi@8496 697 </div>
kojiishi@8496 698 </dd>
ishida@1665 699
fantasai@8526 700 <dt><dfn title="ruby-position:left">''left''</dfn>
kojiishi@8496 701 <dd>The ruby text appears on the left side of the base in vertical text.
kojiishi@8496 702
kojiishi@8496 703 <div class="figure">
fantasai@8526 704 <p><img src="images/shinkansen-left.gif"
fantasai@8526 705 alt="Diagram of ruby glyph layout in vertical mode with ruby text apearing vertically on the left of the base">
fantasai@8526 706 <p class="caption">Ruby to the left of Japanese base text in vertical layout
kojiishi@8496 707 </div>
kojiishi@8496 708 </dd>
kojiishi@8496 709
kojiishi@8496 710 <dt><dfn title="ruby-position:inter-character">''inter-character''</dfn></dt>
kojiishi@8496 711 <dd>
kojiishi@8496 712 <p>The ruby text appears on the right of the base in horizontal text.
fantasai@8526 713 This value forces the 'writing-mode' of the <i>ruby annotation</i> to be vertical.
fantasai@8526 714
fantasai@8526 715 <p>This value is provided for the special case of traditional Chinese
fantasai@8526 716 as used especially in Taiwan:
fantasai@8526 717 ruby (made of <a href="#g-bopomofo">bopomofo</a> glyphs) in that context
fantasai@8526 718 appears vertically along the right side of the base glyph,
fantasai@8526 719 even when the layout of the base characters is horizontal:
kojiishi@8496 720
kojiishi@8496 721 <div class="figure">
fantasai@8526 722 <p><img src="images/bopomofo.gif"
fantasai@8526 723 alt="Example of Taiwanese-style ruby">
fantasai@8526 724 <p class="caption">“Bopomofo” ruby in traditional Chinese
fantasai@8526 725 (ruby text shown in blue for clarity) in horizontal layout
kojiishi@8496 726 </div>
fantasai@8526 727 <p class="note">
fantasai@8526 728 Note that the user agent is responsible for ensuring the correct relative alignment and positioning of the glyphs,
fantasai@8526 729 including those corresponding to the tone marks, when displaying.
fantasai@8526 730 Tone marks are spacing characters that occur (in memory) at the end of the ruby text for each base character.
fantasai@8526 731 They are usually displayed in a separate column to the right of the bopomofo characters,
fantasai@8526 732 and the height of the tone mark depends on the number of characters in the syllable.
fantasai@8526 733 One tone mark, however, is placed above the bopomofo, not to the right of it.
kojiishi@8496 734 <!-- See Taiwanese requirements doc for EPUB at http://epub-revision.googlecode.com/files/EGLS_TW_eng.ppt -->
kojiishi@8496 735 </dd>
kojiishi@8496 736 </dl>
ishida@1665 737
fantasai@8526 738 <p>If multiple <i>ruby annotation containers</i> have the same 'ruby-position',
fantasai@8526 739 they stack along the block axis,
fantasai@8526 740 with lower levels of annotation closer to the base text.
ishida@1665 741
fantasai@8526 742 <h3 id="collapsed-ruby">
fantasai@8526 743 Collapsed Ruby Annotations: the 'ruby-merge' property</h3>
kojiishi@8499 744
kojiishi@8499 745 <table class="propdef">
kojiishi@8499 746 <tr>
kojiishi@8499 747 <th>Name:
kojiishi@8499 748 <td><dfn>ruby-merge</dfn>
kojiishi@8499 749 <tr>
kojiishi@8499 750 <th><a href="#values">Value</a>:
kojiishi@8499 751 <td>separate | collapse | auto
kojiishi@8499 752 <tr>
kojiishi@8499 753 <th>Initial:
kojiishi@8499 754 <td>separate
kojiishi@8499 755 <tr>
kojiishi@8499 756 <th>Applies to:
fantasai@8526 757 <td>ruby annotation containers
fantasai@8526 758 <tr>
fantasai@8526 759 <th>Inherited:
fantasai@8526 760 <td>yes
fantasai@8526 761 <tr>
fantasai@8526 762 <th>Percentages:
fantasai@8526 763 <td>N/A
fantasai@8526 764 <tr>
fantasai@8526 765 <th>Media:
fantasai@8526 766 <td>visual
fantasai@8526 767 <tr>
fantasai@8526 768 <th>Computed value:
fantasai@8526 769 <td>specified value
fantasai@8526 770 <tr>
fantasai@8526 771 <th>Animatable:
fantasai@8526 772 <td>no
fantasai@8526 773 <tr>
fantasai@8526 774 <th>Canonical order:
fantasai@8526 775 <td><abbr title="follows order of property value definition">per grammar</abbr>
fantasai@8526 776 </table>
fantasai@8526 777
fantasai@8526 778 <p>
fantasai@8526 779 This property controls how ruby annotation boxes should be rendered
fantasai@8526 780 when there are more than one in a ruby container box.
fantasai@8526 781
fantasai@8526 782 <p>Possible values:</p>
fantasai@8526 783 <dl>
fantasai@8526 784 <dt><dfn title="ruby-merge:separate">''separate''</dfn>
fantasai@8526 785 <dd>
fantasai@8526 786 <p>
fantasai@8526 787 Each ruby annotation box is rendered in the same column(s) as its corresponding base box(es).
fantasai@8526 788 This style is called “mono ruby” in [[JLREQ]].
fantasai@8526 789
fantasai@8526 790 <div class="example">
fantasai@8526 791 <p>For example, the following two markups render the same:
fantasai@8526 792 <pre>&lt;ruby&gt;無&lt;rt&gt;む&lt;/ruby&gt;&lt;ruby&gt;常&lt;rt&gt;じょう&lt;/ruby&gt;</pre>
fantasai@8526 793 <p>and:
fantasai@8526 794 <pre>&lt;ruby style="ruby-merge:separate"&gt;&lt;rb&gt;無&lt;rb&gt;常&lt;rt&gt;む&lt;rt&gt;じょう&lt;/ruby&gt;</pre>
fantasai@8526 795 </div>
fantasai@8526 796 </dd>
fantasai@8526 797
fantasai@8526 798 <dt><dfn title="ruby-merge:collapse">''collapse''</dfn>
fantasai@8526 799 <dd>
fantasai@8526 800 <p>
fantasai@8526 801 All <i>ruby annotation boxes</i> within the same <i>ruby segment</i> on the same line are concatenated,
fantasai@8526 802 and laid out as if their contents belonged to a single <i>ruby annotation box</i>
fantasai@8526 803 spanning all their associated <i>ruby base boxes.
fantasai@8526 804 This style renders similar to “group ruby” in [[JLREQ]],
fantasai@8526 805 except that <i>ruby annotations</i> are kept together with their respective <i>ruby bases</i> when breaking lines.
fantasai@8526 806 </p>
fantasai@8526 807
fantasai@8526 808 <div class="example">
fantasai@8526 809 <p>The following two markups render the same both characters fit on one line:
fantasai@8526 810 <pre>&lt;ruby&gt;無常&lt;rt&gt;むじょう&lt;/ruby&gt;</pre>
fantasai@8526 811 <p>and:
fantasai@8526 812 <pre>&lt;ruby style="ruby-merge:collapse"&gt;&lt;rb&gt;無&lt;rb&gt;常&lt;rt&gt;む&lt;rt&gt;じょう&lt;/ruby&gt;</pre>
fantasai@8526 813 <p>However, the second one renders the same as ''ruby-position: separate''
fantasai@8526 814 when the two bases are split across lines.
fantasai@8526 815 </div>
fantasai@8526 816 </dd>
fantasai@8526 817
fantasai@8526 818 <dt><dfn title="ruby-merge:auto">''auto''</dfn></dt>
fantasai@8526 819 <dd>
fantasai@8526 820 <p>
fantasai@8526 821 The user agent may use any algorithm to determine how each ruby annotation box
fantasai@8526 822 is rendered to its corresponding base box.
fantasai@8526 823 <div class="example">
fantasai@8526 824 <p>
fantasai@8526 825 One possible algorithm is described as Jukugo-ruby in [[JLREQ]].
fantasai@8526 826 <p>
fantasai@8526 827 Another, more simplified algorithm of Jukugo-ruby is
fantasai@8526 828 to render as Mono-ruby if all ruby annotation boxes fit within
fantasai@8526 829 advances of their corresponding base boxes,
fantasai@8526 830 and render as Group-ruby otherwise.
fantasai@8526 831 </p>
fantasai@8526 832 </div>
fantasai@8526 833 </dd>
fantasai@8526 834 </dl>
fantasai@8526 835
fantasai@8526 836 <h3 id="rubyalign">
fantasai@8526 837 Ruby Text Distribution: the 'ruby-align' property</h3>
fantasai@8526 838
fantasai@8526 839 <table class="propdef">
fantasai@8526 840 <tr>
fantasai@8526 841 <th>Name:
fantasai@8526 842 <td><dfn>ruby-align</dfn>
fantasai@8526 843 <tr>
fantasai@8526 844 <th><a href="#values">Value</a>:
fantasai@8526 845 <td>auto | start | center |
fantasai@8526 846 distribute-letter | distribute-space
fantasai@8526 847 <tr>
fantasai@8526 848 <th>Initial:
fantasai@8526 849 <td>auto
fantasai@8526 850 <tr>
fantasai@8526 851 <th>Applies to:
fantasai@8526 852 <td>ruby bases, ruby annotations, ruby base containers, ruby annotation containers
kojiishi@8499 853 <tr>
kojiishi@8499 854 <th>Inherited:
kojiishi@8499 855 <td>yes
kojiishi@8499 856 <tr>
kojiishi@8499 857 <th>Percentages:
kojiishi@8499 858 <td>N/A
kojiishi@8499 859 <tr>
kojiishi@8499 860 <th>Media:
kojiishi@8499 861 <td>visual
kojiishi@8499 862 <tr>
kojiishi@8499 863 <th>Computed value:
kojiishi@8499 864 <td>specified value (except for initial and inherit)
kojiishi@8499 865 </table>
kojiishi@8499 866
fantasai@8526 867 <p>This property specifies how text is distributed within the various ruby boxes
fantasai@8526 868 when their text contents exactly fill their respective boxes.
kojiishi@8499 869
fantasai@8526 870 <p>Values have the following meanings:
kojiishi@8496 871 <p class="issue"><span class="issuehead">Issue:&nbsp;</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>
kojiishi@8496 872 <dl>
kojiishi@8496 873 <dt><dfn title="ruby-align:auto">''auto''</dfn></dt>
kojiishi@8496 874 <dd>
kojiishi@8496 875 <p>The user agent determines how the ruby contents are aligned.
kojiishi@8496 876 This is the initial value.
kojiishi@8496 877 The behavior recommended by [[JLREQ]] is for wide-cell ruby to be aligned in the 'distribute-space' mode:
kojiishi@8496 878 <div class="figure">
kojiishi@8496 879 <p><img width="145" height="91"
kojiishi@8496 880 alt="Diagram of glyph layout in auto aligned ruby when ruby text is shorter than base"
kojiishi@8496 881 src="images/ra-ds.gif" /><img width="145" height="91"
kojiishi@8496 882 alt="Diagram of glyph layout in auto aligned ruby when ruby text is longer than base"
kojiishi@8496 883 src="images/ra-ds-rb.gif" /></p>
kojiishi@8496 884 <p><b>Figure 4.2.1</b>: Wide-cell text in 'auto' ruby alignment is
kojiishi@8496 885 'distribute-space' justified</p>
kojiishi@8496 886 </div>
ishida@1665 887
kojiishi@8496 888 <p>The recommended behavior for narrow-cell glyph ruby is to be
kojiishi@8496 889 aligned in the 'center' mode.</p>
kojiishi@8496 890 <div class="figure">
kojiishi@8496 891 <p><img
kojiishi@8496 892 alt="Diagram of glyph layout in auto aligned ruby when halfwidth ruby text is shorter than base"
kojiishi@8496 893 width="145" height="91"
kojiishi@8496 894 src="images/ra-c-h.gif" /><img
kojiishi@8496 895 alt="Diagram of character layout in auto aligned ruby when ruby text is longer than narrow-width base"
kojiishi@8496 896 width="145" height="91"
kojiishi@8496 897 src="images/ra-c-rb-h.gif" /></p>
kojiishi@8496 898 <p><b>Figure 4.2.2</b>: Narrow-width ruby text in 'auto' ruby alignment
kojiishi@8496 899 is centered</p>
kojiishi@8496 900 </div>
kojiishi@8496 901 </dd>
ishida@1665 902
kojiishi@8496 903 <dt><dfn title="ruby-align:start">''start''</dfn></dt>
fantasai@8526 904 <dd>The ruby annotation content is aligned with the start edge of the base.
kojiishi@8496 905 <div class="figure">
kojiishi@8496 906 <p><img
kojiishi@8496 907 alt="Diagram of glyph layout in left aligned ruby when ruby text is shorter than base"
kojiishi@8496 908 width="145" height="91" src="images/ra-l.gif" /><img
kojiishi@8496 909 width="145" height="91"
kojiishi@8496 910 alt="Diagram of glyph layout in left aligned ruby when ruby text is longer than base"
kojiishi@8496 911 src="images/ra-l-rb.gif" /></p>
kojiishi@8496 912 <p><b>Figure 4.2.3</b>: Start ruby alignment</p>
kojiishi@8496 913 </div>
kojiishi@8496 914 </dd>
kojiishi@8496 915
kojiishi@8496 916 <dt><dfn title="ruby-align:center">''center''</dfn></dt>
kojiishi@8496 917 <dd>The ruby text content is centered within the width of the base. If the
kojiishi@8496 918 length of the base is smaller than the length of the ruby text, then the
kojiishi@8496 919 base is centered within the width of the ruby text.
kojiishi@8496 920
kojiishi@8496 921 <div class="figure">
kojiishi@8496 922 <p><img width="145" height="91"
kojiishi@8496 923 alt="Diagram of glyph layout in center aligned ruby when ruby text is shorter than base"
kojiishi@8496 924 src="images/ra-c.gif" /><img width="145" height="91"
kojiishi@8496 925 alt="Diagram of glyph layout in center aligned ruby when ruby text is longer than base"
kojiishi@8496 926 src="images/ra-c-rb.gif" /></p>
kojiishi@8496 927 <p><b>Figure 4.2.4</b>: Center ruby alignment</p>
kojiishi@8496 928 </div>
kojiishi@8496 929 </dd>
kojiishi@8496 930
kojiishi@8496 931 <!--
ishida@1665 932 <dt><strong>right</strong></dt>
ishida@1665 933 <dd>The ruby text content is aligned with the end edge of the base.
ishida@3034 934 <p class="issue"><span class="issuehead">Issue:&nbsp;</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=&amp;hdr-1-name=subject&amp;hdr-1-query=[CSS3+Ruby]%20left/start+and+right/end&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;index-grp=Member__FULL+Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core%40w3.org&amp;resultsperpage=20&amp;sortby=date">this thread</a>.</p>
ishida@1665 935 <div class="figure">
ishida@1665 936 <p><img class="example" width="145" height="91"
ishida@1665 937 alt="Diagram of glyph layout in right aligned ruby when ruby text is shorter than base"
ishida@1666 938 src="images/ra-r.gif" /><img class="example" width="145" height="91"
ishida@1665 939 alt="Diagram of glyph layout in right aligned ruby when ruby text is longer than base"
ishida@1666 940 src="images/ra-r-rb.gif" /></p>
ishida@1665 941 <p><b>Figure 4.2.5</b>: End ruby alignment</p>
ishida@1665 942 </div>
ishida@1665 943 </dd>
kojiishi@8496 944 -->
ishida@1665 945
kojiishi@8496 946 <dt><dfn title="ruby-align:distribute-letter">''distribute-letter''</dfn></dt>
kojiishi@8496 947 <dd>If the width of the ruby text is smaller than that of the base, then
kojiishi@8496 948 the ruby text contents are evenly distributed across the width of the
kojiishi@8496 949 base, with the first and last ruby text glyphs lining up with the
kojiishi@8496 950 corresponding first and last base glyphs. If the width of the ruby text
kojiishi@8496 951 is at least the width of the base, then the letters of the base are
kojiishi@8496 952 evenly distributed across the width of the ruby text.
kojiishi@8496 953
kojiishi@8496 954 <div class="figure">
kojiishi@8496 955 <p><img width="145" height="91"
kojiishi@8496 956 alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is shorter than base"
kojiishi@8496 957 src="images/ra-dl.gif" /><img width="145" height="91"
kojiishi@8496 958 alt="Diagram of glyph layout in distribute-letter aligned ruby when ruby text is longer than base"
kojiishi@8496 959 src="images/ra-dl-rb.gif" /></p>
kojiishi@8496 960 <p><b>Figure 4.2.6</b>: Distribute-letter ruby alignment</p>
kojiishi@8496 961 </div>
kojiishi@8496 962 </dd>
kojiishi@8496 963
kojiishi@8496 964 <dt><dfn title="ruby-align:distribute-space">''distribute-space''</dfn></dt>
kojiishi@8496 965 <dd>If the width of the ruby text is smaller than that of the base, then
kojiishi@8496 966 the ruby text contents are evenly distributed across the width of the
kojiishi@8496 967 base, with a certain amount of white space preceding the first and
kojiishi@8496 968 following the last character in the ruby text. That amount of white
kojiishi@8496 969 space is normally equal to half the amount of inter-character space of
kojiishi@8496 970 the ruby text. If the width of the ruby text is at least the width of
kojiishi@8496 971 the base, then the same type of space distribution applies to the base.
kojiishi@8496 972 In other words, if the base is shorter than the ruby text, the base is
kojiishi@8496 973 distribute-space aligned. This type of alignment
kojiishi@8496 974 is described by [[JLREQ]].
kojiishi@8496 975
kojiishi@8496 976 <div class="figure">
kojiishi@8496 977 <p><img width="145" height="91"
kojiishi@8496 978 alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is shorter than base"
kojiishi@8496 979 src="images/ra-ds.gif" /><img width="145" height="91"
kojiishi@8496 980 alt="Diagram of glyph layout in distribute-space aligned ruby when ruby text is longer than base"
kojiishi@8496 981 src="images/ra-ds-rb.gif" /></p>
kojiishi@8496 982 <p><b>Figure 4.2.7</b>: Distribute-space ruby alignment</p>
kojiishi@8496 983 </div>
kojiishi@8496 984 </dd>
kojiishi@8496 985
kojiishi@8496 986 <!--
ishida@1665 987 <dt><strong>line-edge</strong></dt>
ishida@1665 988 <dd>If the ruby text is not adjacent to a line edge, it is aligned as in
ishida@1665 989 'auto'. If it is adjacent to a line edge, then it is still aligned as in
ishida@1665 990 auto, but the side of the ruby text that touches the end of the line is
ishida@1665 991 lined up with the corresponding edge of the base. This type of alignment
fantasai@8479 992 is described by [[JLREQ]]. This type of alignment is
ishida@1665 993 relevant only to the scenario where the ruby text is longer than the
ishida@1665 994 ruby base. In the other scenarios, this is just 'auto'.
ishida@1665 995 <div class="figure">
ishida@1665 996 <p><img class="example" width="146" height="109"
ishida@1665 997 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base"
ishida@1666 998 src="images/ra-le-l.gif" /><img class="example" width="146"
ishida@1665 999 height="110"
ishida@1665 1000 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base"
ishida@1666 1001 src="images/ra-le-r.gif" /></p>
ishida@1665 1002 <p><b>Figure 4.2.8</b>: Line edge ruby alignment</p>
ishida@1665 1003 </div>
ishida@1665 1004 </dd>
kojiishi@8496 1005 -->
kojiishi@8496 1006 </dl>
ishida@1665 1007
kojiishi@8496 1008 <p>For a complex ruby with spanning elements, one additional consideration is
kojiishi@8496 1009 required. If the spanning element spans multiple 'rows' (other rbc or rtc
kojiishi@8496 1010 elements), and the ruby alignment requires space distribution among the
kojiishi@8496 1011 'spanned' elements, a ratio must be determined among the 'columns' of spanned
kojiishi@8496 1012 elements. This ratio is computed by taking into consideration the widest
kojiishi@8496 1013 element within each column.</p>
ishida@1665 1014
fantasai@8527 1015 <h2 id="edge-effects">
fantasai@8527 1016 Edge Effects</h2>
fantasai@8527 1017
fantasai@8527 1018 <h3 id="ruby-overhang">
fantasai@8527 1019 Overhanging Ruby</h3>
kojiishi@8502 1020
kojiishi@8502 1021 <p>
kojiishi@8502 1022 When <i>ruby annotation box</i> is longer than its corresponding <i>ruby base box</i>,
kojiishi@8502 1023 the <i>ruby annotation box</i> may partially overhang adjacent boxes.
kojiishi@8502 1024 </p>
kojiishi@8502 1025 <p>
fantasai@8527 1026 This level of the specification does not define
kojiishi@8503 1027 how much the overhang may be allowed, and under what conditions.
kojiishi@8502 1028 </p>
fantasai@8527 1029
fantasai@8527 1030 <p>If the ruby text is not allowed to overhang,
fantasai@8527 1031 then the ruby behaves like a traditional inline box,
fantasai@8527 1032 i.e. only its own contents are rendered within its boundaries
fantasai@8527 1033 and adjacent elements do not cross the box boundary:
fantasai@8527 1034
fantasai@8527 1035 <div class="figure">
fantasai@8527 1036 <p><img src="images/ro-n.gif"
fantasai@8527 1037 alt="Diagram showing the ruby boxes interacting with adjacent text">
fantasai@8527 1038 <p class="caption">Simple ruby whose text is not allowed to overhang adjacent text
fantasai@8527 1039 </div>
fantasai@8527 1040
fantasai@8527 1041 <p>However, if <i>ruby annotation</i> content is allowed to overhang adjacent elements
fantasai@8527 1042 and it happens to be wider than its base,
fantasai@8527 1043 then the adjacent content is partially rendered within the area of the <i>ruby container box</i>,
fantasai@8527 1044 while the <i>ruby annotation</i> may partially overlap the upper blank parts of the adjacent content:
fantasai@8527 1045
fantasai@8527 1046 <div class="figure">
fantasai@8527 1047 <p><img src="images/ro-a.gif"
fantasai@8527 1048 alt="Diagram showing the ruby boxes interacting with adjacent text">
fantasai@8527 1049 <p class="caption">Simple ruby whose text is allowed to overhang adjacent text
fantasai@8527 1050 </div>
fantasai@8527 1051
fantasai@8527 1052 <p>The <i>ruby annotations</i> related to a <i>ruby base</i>
fantasai@8527 1053 must never overhang another <i>ruby base</i>.
fantasai@8527 1054
fantasai@8527 1055 <p>The alignment of the contents of the base or the ruby text
fantasai@8527 1056 is not affected by overhanging behavior.
fantasai@8527 1057 The alignment is achieved the same way regardless of the overhang behavior setting
fantasai@8527 1058 and it is computed before the space available for overlap is determined.
fantasai@8527 1059 It is controlled by the 'ruby-align' property.
fantasai@8527 1060
fantasai@8661 1061 <p class="issue">
fantasai@8661 1062 I suspect overhanging interacts with alignment in some cases;
fantasai@8661 1063 might need to look into this later.
fantasai@8661 1064
fantasai@8527 1065 <p>This entire logic applies the same way in vertical ideographic layout,
fantasai@8527 1066 only the dimension in which it works in such a layout is vertical,
fantasai@8527 1067 instead of horizontal.
fantasai@8527 1068
kojiishi@8502 1069 <div class="example">
kojiishi@8502 1070 <p>
kojiishi@8502 1071 The user agent may use [[JIS4051]] recommendation of
kojiishi@8502 1072 using one ruby text character length as the maximum overhang length.
kojiishi@8502 1073 Detailed rules for how ruby text can overhang adjacent characters for Japanese are described by [[JLREQ]].
kojiishi@8502 1074 </p>
kojiishi@8502 1075 </div>
kojiishi@8502 1076
fantasai@8527 1077 <h3 id="line-edge">
fantasai@8527 1078 Line-edge Alignment</h3>
fantasai@8527 1079
kojiishi@8502 1080 <p>
fantasai@8527 1081 When a <i>ruby annotation box</i> that is longer than its <i>ruby base</i>
fantasai@8527 1082 is at the start or end edge of a line,
fantasai@8527 1083 the user agent <em>may</em> force the side of the <i>ruby annotation</i> that touches the edge of the line
fantasai@8527 1084 to align to the corresponding edge of the base.
kojiishi@8502 1085 This type of alignment is described by [[JLREQ]].
kojiishi@8502 1086 </p>
kojiishi@8502 1087 <p>
fantasai@8527 1088 This level of the specification does not provide a mechanism to control this behavior.
kojiishi@8502 1089 </p>
kojiishi@8502 1090 <div class="figure">
fantasai@8527 1091 <p><img src="images/ra-le-l.gif"
fantasai@8527 1092 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is shorter than base">
fantasai@8527 1093 <img src="images/ra-le-r.gif"
fantasai@8527 1094 alt="Diagram of glyph layout in line-edge aligned ruby when ruby text is longer than base">
fantasai@8527 1095 <p class="caption">Line-edge alignment
kojiishi@8502 1096 </div>
kojiishi@8502 1097
kojiishi@8496 1098 <!--
fantasai@8479 1099 <h3 id="rubyover">
fantasai@8479 1100 Ruby overhanging: the 'ruby-overhang' property</h3>
ishida@1665 1101
fantasai@8479 1102 <table class="propdef">
fantasai@8479 1103 <tr>
fantasai@8479 1104 <th>Name:
fantasai@8479 1105 <td><dfn>ruby-overhang</dfn>
fantasai@8479 1106 <tr>
fantasai@8479 1107 <th>Value:
fantasai@8479 1108 <td>auto | start | end | none
fantasai@8479 1109 <tr>
fantasai@8479 1110 <th>Initial:
fantasai@8479 1111 <td>none
fantasai@8479 1112 <tr>
fantasai@8479 1113 <th>Applies to:
fantasai@8479 1114 <td>the parent of elements with display: ruby-text
fantasai@8479 1115 <tr>
fantasai@8479 1116 <th>Inherited:
fantasai@8479 1117 <td>yes
fantasai@8479 1118 <tr>
fantasai@8479 1119 <th>Percentages:
fantasai@8479 1120 <td>N/A
fantasai@8479 1121 <tr>
fantasai@8479 1122 <th>Media:
fantasai@8479 1123 <td>visual
fantasai@8479 1124 <tr>
fantasai@8479 1125 <th>Computed value:
fantasai@8479 1126 <td>specified value (except for initial and inherit)
fantasai@8479 1127 </table>
ishida@1665 1128
ishida@1665 1129 <p>This property determines whether, and on which side, ruby text is allowed
ishida@1665 1130 to partially overhang any adjacent text in addition to its own base, when the
ishida@1665 1131 ruby text is wider than the ruby base. Note that ruby text is never allowed to
ishida@1665 1132 overhang glyphs belonging to another ruby base. <span class="issue"><span class="issuehead">Issue:&nbsp;</span> This rule must be broken if we are to allow support for jukugo ruby.</span> Also the user agent is free to assume
ishida@1665 1133 a maximum amount by which ruby text may overhang adjacent text. The user agent may use
fantasai@8479 1134 the [[JIS4051]] recommendation of using one ruby text character
fantasai@8479 1135 length as the maximum overhang length. Detailed rules for how ruby text can overhang adjacent characters for Japanese are described by [[JLREQ]].</p>
ishida@1665 1136
ishida@1665 1137 <p>Possible values:</p>
ishida@1665 1138 <dl>
ishida@1665 1139 <dt><strong>auto</strong></dt>
fantasai@8479 1140 <dd>The ruby text can overhang text adjacent to the base on either side. [[JLREQ]] and [[JIS4051]] specify the categories of characters that
ishida@3034 1141 ruby text can overhang. The user agent is free to follow those recommendations or specify its own classes of
ishida@1665 1142 characters to overhang. This is the initial value.
ishida@1665 1143 <div class="figure">
ishida@1665 1144 <p><img class="example" width="177" height="91"
ishida@1666 1145 alt="Diagram of glyph layout in overhanging ruby" src="images/ro-a.gif" /></p>
ishida@1665 1146 <p><b>Figure 4.3.1</b>: Ruby overhanging adjacent text</p>
ishida@1665 1147 </div>
ishida@1665 1148 </dd>
ishida@1665 1149 <dt><strong>start</strong></dt>
ishida@3034 1150 <dd>The ruby text can only overhang the text that precedes it. That means, for
ishida@3034 1151 example, that ruby cannot overhang text that is to the right of it in
ishida@3034 1152 horizontal LTR layout, and it cannot overhang text that is below it in
ishida@1665 1153 vertical-ideographic layout.
ishida@1665 1154 <div class="figure">
ishida@1665 1155 <p><img class="example" width="199" height="91"
ishida@1665 1156 alt="Diagram of glyph layout when ruby overhangs the preceding glyphs only"
ishida@1666 1157 src="images/ro-s.gif" /></p>
ishida@1665 1158 <p><b>Figure 4.3.2</b>: Ruby overhanging preceding text only</p>
ishida@1665 1159 </div>
ishida@1665 1160 </dd>
ishida@1665 1161 <dt><strong>end</strong></dt>
ishida@3034 1162 <dd>The ruby text can only overhang the text that follows it. That means, for
ishida@3034 1163 example, that ruby cannot overhang text that is to the left of it in
ishida@3034 1164 horizontal LTR layout, and it cannot overhang text that is above it in
ishida@1665 1165 vertical-ideographic layout.
ishida@1665 1166 <div class="figure">
ishida@1665 1167 <p><img class="example" width="198" height="91"
ishida@1665 1168 alt="Diagram of glyph layout when ruby overhangs the following characters only"
ishida@1666 1169 src="images/ro-e.gif" /></p>
ishida@1665 1170 <p><b>Figure 4.3.3</b>: Ruby overhanging following text only</p>
ishida@1665 1171 </div>
ishida@1665 1172 </dd>
ishida@1665 1173 <dt><strong>none</strong></dt>
ishida@1665 1174 <dd>The ruby text cannot overhang any text adjacent to its base, only its
ishida@1665 1175 own base.
ishida@1665 1176
ishida@1665 1177 <div class="figure">
ishida@1665 1178 <p><img class="example" width="220" height="91"
ishida@1665 1179 alt="Diagram of glyph layout in non-overhanging ruby"
ishida@1666 1180 src="images/ro-n.gif" /></p>
ishida@1665 1181 <p><b>Figure 4.3.4</b>: Ruby not allowed to overhang adjacent text</p>
ishida@1665 1182 </div>
ishida@1665 1183 </dd>
ishida@1665 1184 </dl>
ishida@1665 1185
fantasai@8479 1186 <h3 id="rubyspan">
fantasai@8479 1187 Ruby annotation spanning: the 'ruby-span' property</h3>
ishida@1665 1188
fantasai@8479 1189 <table class="propdef">
fantasai@8479 1190 <tr>
fantasai@8479 1191 <th>Name:
fantasai@8479 1192 <td><dfn>ruby-span</dfn>
fantasai@8479 1193 <tr>
fantasai@8479 1194 <th>Value:
fantasai@8479 1195 <td>attr(x) | none
fantasai@8479 1196 <tr>
fantasai@8479 1197 <th>Initial:
fantasai@8479 1198 <td>none
fantasai@8479 1199 <tr>
fantasai@8479 1200 <th>Applies to:
fantasai@8479 1201 <td>elements with display: ruby-text
fantasai@8479 1202 <tr>
fantasai@8479 1203 <th>Inherited:
fantasai@8479 1204 <td>no
fantasai@8479 1205 <tr>
fantasai@8479 1206 <th>Percentages:
fantasai@8479 1207 <td>N/A
fantasai@8479 1208 <tr>
fantasai@8479 1209 <th>Media:
fantasai@8479 1210 <td>visual
fantasai@8479 1211 <tr>
fantasai@8479 1212 <th>Computed value:
fantasai@8479 1213 <td>&lt;number&gt;
fantasai@8479 1214 </table>
ishida@1665 1215
ishida@1665 1216 <p>This property controls the spanning behavior of annotation elements. </p>
ishida@1665 1217
ishida@1665 1218 <p class="note"><span class="note-label">Note:</span> A XHTML user agent may also use the <samp>rbspan</samp>
ishida@1665 1219 attribute to get the same effect.</p>
ishida@1665 1220
ishida@1665 1221 <p>Possible values:</p>
ishida@1665 1222
ishida@1665 1223 <dl>
ishida@1665 1224 <dt><strong>attr(x)</strong></dt>
ishida@1665 1225 <dd>The value of attribute 'x' as a string value. The string value is
ishida@1665 1226 evaluated as a &lt;number&gt; to determine the number of ruby base elements to be
ishida@1665 1227 spanned by the annotation element. If the &lt;number&gt; is &#39;0&#39;, it is replaced by
ishida@1665 1228 &#39;1&#39;.The &lt;number&gt; is the computed value. </dd>
ishida@1665 1229 <dt>none</dt>
ishida@1665 1230 <dd>No spanning. The computed value is &#39;1&#39;.</dd>
ishida@1665 1231 </dl>
ishida@1665 1232
ishida@1665 1233 <p>The following example shows an XML example using the 'display' property
ishida@1665 1234 values associated with the 'ruby structure and the 'ruby-span' property</p>
ishida@3034 1235 <pre class="xml">myruby { display: ruby; }
ishida@1665 1236 myrbc { display: ruby-base-container; }
ishida@1665 1237 myrb { display: ruby-base; }
ishida@1665 1238 myrtc.before { display: ruby-text-container; ruby-position: before}
ishida@1665 1239 myrtc.after { display: ruby-text-container; ruby-position: after}
ishida@1665 1240 myrt { display: ruby-text; ruby-span: attr(rbspan); }
ishida@1665 1241 ...
ishida@1665 1242 &lt;myruby&gt;
ishida@1665 1243 &lt;myrbc&gt;
ishida@1665 1244 &lt;myrb&gt;10&lt;/myrb&gt;
ishida@1665 1245 &lt;myrb&gt;31&lt;/myrb&gt;
ishida@1665 1246 &lt;myrb&gt;2002&lt;/myrb&gt;
ishida@1665 1247 &lt;/myrbc&gt;
ishida@1665 1248 &lt;myrtc class=&quot;before&quot;&gt;
ishida@1665 1249 &lt;myrt&gt;Month&lt;/myrt&gt;
ishida@1665 1250 &lt;myrt&gt;Day&lt;/myrt&gt;
ishida@1665 1251 &lt;myrt&gt;Year&lt;/myrt&gt;
ishida@1665 1252 &lt;/myrtc&gt;
ishida@1665 1253 &lt;myrtc class=&quot;after&quot;&gt;
ishida@1665 1254 &lt;myrt rbspan=&quot;3&quot;&gt;Expiration Date&lt;/myrt&gt;
ishida@1665 1255 &lt;/myrtc&gt;
ishida@1665 1256 &lt;/myruby&gt;</pre>
kojiishi@8496 1257 -->
ishida@1665 1258
fantasai@8497 1259 <h2 id="default-stylesheet" class="no-num">
fantasai@8497 1260 Appendix A: Default Style Sheet</h2>
ishida@1665 1261
fantasai@8497 1262 <p><em>This section is informative.</em>
ishida@1665 1263
fantasai@8497 1264 <h3 id="default-ua-ruby" class="no-num">
fantasai@8497 1265 <span class="secno">A.1</span> Supporting Ruby Layout</h3>
ishida@1665 1266
fantasai@8497 1267 <p>The following represents a default UA style sheet
fantasai@8497 1268 for rendering HTML and XHTML ruby markup as ruby layout:
ishida@1665 1269
fantasai@8497 1270 <pre>
fantasai@8497 1271 <!-- -->ruby { display: ruby; }
fantasai@8497 1272 <!-- -->rb { display: ruby-base; white-space: nowrap; }
fantasai@8497 1273 <!-- -->rt { display: ruby-text; white-space: nowrap; font-size: 50%; }
fantasai@8497 1274 <!-- -->rbc { display: ruby-base-container; }
fantasai@8497 1275 <!-- -->rtc { display: ruby-text-container; }</pre>
fantasai@8497 1276
fantasai@8497 1277 <p>Additional rules for UAs supporting the relevant features of [[CSS3-TEXT-DECOR]] and [[CSS3-FONTS]]:
fantasai@8497 1278 <pre>rt { font-variant-east-asian: ruby; text-emphasis: none; }</pre>
fantasai@8497 1279
fantasai@8497 1280 <p class="note">Authors should not use the above rules;
fantasai@8497 1281 a UA that supports ruby layout should provide these by default.
fantasai@8497 1282
fantasai@8497 1283 <h3 id="default-inline" class="no-num">
fantasai@8497 1284 <span class="secno">A.2</span> Inlining Ruby Annotations</h3>
fantasai@8497 1285
fantasai@8497 1286 <p>The following represents a sample style sheet
fantasai@8497 1287 for rendering HTML and XHTML ruby markup as inline annotations:
fantasai@8497 1288
fantasai@8497 1289 <pre>ruby, rb, rt, rbc, rtc, rp {
fantasai@8497 1290 <!-- --> display: inline; white-space: inherit;
fantasai@8497 1291 <!-- --> font-variant-east-asian: inherit; text-emphasis: inherit; }</pre>
fantasai@8497 1292
fantasai@8497 1293 <h3 id="default-parens" class="no-num">
fantasai@8497 1294 <span class="secno">A.3</span> Generating Parentheses</h3>
fantasai@8497 1295
fantasai@8497 1296 <p>Unfortunately, because Selectors cannot match against text nodes,
fantasai@8497 1297 it's not possible with CSS to express rules that will automatically and correctly
fantasai@8497 1298 add parentheses to unparenthesized ruby annotations in HTML.
fantasai@8498 1299 (This is because HTML ruby allows implying the <i>ruby base</i> from raw text, without a corresponding element.)
fantasai@8498 1300 However, these rules will handle cases where either <code>&lt;rb&gt;</code>
fantasai@8498 1301 or <code>&lt;rtc&gt;</code> is used rigorously.
fantasai@8498 1302
fantasai@8497 1303 <pre>
fantasai@8498 1304 <!-- -->/* Parens around &lt;rtc> */
fantasai@8497 1305 <!-- -->rtc::before { content: "("; }
fantasai@8498 1306 <!-- -->rtc::after { content: ")"; }
fantasai@8497 1307
fantasai@8498 1308 <!-- -->/* Parens before first &lt;rt> not inside &lt;rtc> */
fantasai@8498 1309 <!-- -->rb + rt::before,
fantasai@8498 1310 <!-- -->rtc + rt::before { content: "("; }
fantasai@8497 1311
fantasai@8498 1312 <!-- -->/* Parens after &lt;rt> not inside &lt;rtc> */
fantasai@8498 1313 <!-- -->rb ~ rt:last-child::after,
fantasai@8498 1314 <!-- -->rt + rb::before { content: ")"; }
fantasai@8498 1315 <!-- -->rt + rtc::before { content: ")("; }</pre>
ishida@1665 1316
fantasai@8479 1317 <h2 id="glossary">
fantasai@8479 1318 Glossary</h2>
ishida@1665 1319 <dl>
ishida@1665 1320 <dt><a id="g-bopomofo"><strong><span
ishida@1665 1321 lang="zh">Bopomofo</span></strong></a></dt>
ishida@1665 1322 <dd>37 characters and 4 tone markings used as phonetics in Chinese,
ishida@1665 1323 especially standard Mandarin.</dd>
ishida@1665 1324 <dt><a id="g-hanja"><strong><span
ishida@1665 1325 lang="ko">Hanja</span></strong></a></dt>
ishida@1665 1326 <dd>Subset of the Korean writing system that utilizes ideographic
ishida@1665 1327 characters borrowed or adapted from the Chinese writing system. Also see
ishida@1665 1328 <a href="#g-kanji"><span lang="ja">Kanji</span></a>.</dd>
ishida@1665 1329 <dt><a id="g-hiragana"><strong><span
ishida@1665 1330 lang="ja">Hiragana</span></strong></a></dt>
ishida@1665 1331 <dd>Japanese syllabic script, or character of that script. Rounded and
ishida@1665 1332 cursive in appearance. Subset of the Japanese writing system, used together
ishida@1665 1333 with kanji and katakana. In recent times, mostly used to write Japanese
ishida@1665 1334 words when kanji are not available or appropriate, and word endings and
ishida@1665 1335 particles. Also see <a
ishida@1665 1336 href="#g-katakana"><span lang="ja">Katakana</span></a>.</dd>
ishida@1665 1337 <dt><a id="g-ideogram"><strong>Ideograph</strong></a></dt>
ishida@1665 1338 <dd>A character that is used to represent an idea, word, or word component,
ishida@1665 1339 in contrast to a character from an alphabetic or syllabic script. The most
ishida@1665 1340 well-known ideographic script is used (with some variation) in East Asia
ishida@1665 1341 (China, Japan, Korea,...).</dd>
ishida@1665 1342 <dt><a id="g-kana"><strong><span lang="ja">Kana</span></strong></a></dt>
ishida@1665 1343 <dd>Collective term for hiragana and katakana.</dd>
ishida@1665 1344 <dt><a id="g-kanji"><strong>Kanji</strong></a></dt>
ishida@1665 1345 <dd>Japanese term for ideographs; ideographs used in Japanese. Subset of the
ishida@1665 1346 Japanese writing system, used together with hiragana and katakana. Also see <a
ishida@1665 1347 href="#g-hanja"><span lang="ko">Hanja</span></a>.</dd>
ishida@1665 1348 <dt><a id="g-katakana"><strong><span
ishida@1665 1349 lang="ja">Katakana</span></strong></a></dt>
ishida@1665 1350 <dd>Japanese syllabic script, or character of that script. Angular in
ishida@1665 1351 appearance. Subset of the Japanese writing system,&nbsp; used together with
ishida@1665 1352 kanji and hiragana. In recent times, mainly used to write foreign words. Also see <a
ishida@1665 1353 href="#g-hiragana"><span lang="ja">Hiragana</span></a>.</dd>
ishida@1665 1354 <dt><a id="g-monoruby" name="g-monoruby"><strong>Mono-ruby</strong></a></dt>
ishida@1665 1355 <dd>In Japanese typography: Ruby associated with a single character of
ishida@1665 1356 the base text.</dd>
ishida@1665 1357 <dt><a id="g-ruby"><strong>Ruby</strong></a></dt>
ishida@1665 1358 <dd>A run of text that appears in the vicinity of another run of text and
ishida@1665 1359 serves as an annotation or a pronunciation guide for that text.</dd>
ishida@1665 1360 </dl>
ishida@1665 1361
fantasai@8479 1362 <h2 id="conformance">
fantasai@8479 1363 Conformance</h2>
fantasai@8479 1364
fantasai@8479 1365 <h3 id="conventions">
fantasai@8479 1366 Document conventions</h3>
fantasai@8479 1367
fantasai@8479 1368 <p>Conformance requirements are expressed with a combination of
fantasai@8479 1369 descriptive assertions and RFC 2119 terminology. The key words “MUST”,
fantasai@8479 1370 “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
fantasai@8479 1371 “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
fantasai@8479 1372 document are to be interpreted as described in RFC 2119.
fantasai@8479 1373 However, for readability, these words do not appear in all uppercase
fantasai@8479 1374 letters in this specification.
fantasai@8479 1375
fantasai@8479 1376 <p>All of the text of this specification is normative except sections
fantasai@8479 1377 explicitly marked as non-normative, examples, and notes. [[!RFC2119]]</p>
fantasai@8479 1378
fantasai@8479 1379 <p>Examples in this specification are introduced with the words “for example”
fantasai@8479 1380 or are set apart from the normative text with <code>class="example"</code>,
fantasai@8479 1381 like this:
fantasai@8479 1382
fantasai@8479 1383 <div class="example">
fantasai@8479 1384 <p>This is an example of an informative example.</p>
fantasai@8479 1385 </div>
fantasai@8479 1386
fantasai@8479 1387 <p>Informative notes begin with the word “Note” and are set apart from the
fantasai@8479 1388 normative text with <code>class="note"</code>, like this:
fantasai@8479 1389
fantasai@8479 1390 <p class="note">Note, this is an informative note.</p>
fantasai@8479 1391
fantasai@8479 1392 <h3 id="conformance-classes">
fantasai@8479 1393 Conformance classes</h3>
fantasai@8479 1394
fantasai@8479 1395 <p>Conformance to CSS Ruby Module
fantasai@8479 1396 is defined for three conformance classes:
fantasai@8479 1397 <dl>
fantasai@8479 1398 <dt><dfn title="style sheet!!as conformance class">style sheet</dfn>
fantasai@8479 1399 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
fantasai@8479 1400 style sheet</a>.
fantasai@8479 1401 <dt><dfn>renderer</dfn></dt>
fantasai@8479 1402 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
fantasai@8479 1403 that interprets the semantics of a style sheet and renders
fantasai@8479 1404 documents that use them.
fantasai@8479 1405 <dt><dfn id="authoring-tool">authoring tool</dfn></dt>
fantasai@8479 1406 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
fantasai@8479 1407 that writes a style sheet.
fantasai@8479 1408 </dl>
fantasai@8479 1409
fantasai@8479 1410 <p>A style sheet is conformant to CSS Ruby Module
fantasai@8479 1411 if all of its statements that use syntax defined in this module are valid
fantasai@8479 1412 according to the generic CSS grammar and the individual grammars of each
fantasai@8479 1413 feature defined in this module.
fantasai@8479 1414
fantasai@8479 1415 <p>A renderer is conformant to CSS Ruby Module
fantasai@8479 1416 if, in addition to interpreting the style sheet as defined by the
fantasai@8479 1417 appropriate specifications, it supports all the features defined
fantasai@8479 1418 by CSS Ruby Module by parsing them correctly
fantasai@8479 1419 and rendering the document accordingly. However, the inability of a
fantasai@8479 1420 UA to correctly render a document due to limitations of the device
fantasai@8479 1421 does not make the UA non-conformant. (For example, a UA is not
fantasai@8479 1422 required to render color on a monochrome monitor.)
fantasai@8479 1423
fantasai@8479 1424 <p>An authoring tool is conformant to CSS Ruby Module
fantasai@8479 1425 if it writes style sheets that are syntactically correct according to the
fantasai@8479 1426 generic CSS grammar and the individual grammars of each feature in
fantasai@8479 1427 this module, and meet all other conformance requirements of style sheets
fantasai@8479 1428 as described in this module.
fantasai@8479 1429
fantasai@8479 1430 <h3 id="partial">
fantasai@8479 1431 Partial implementations</h3>
fantasai@8479 1432
fantasai@8479 1433 <p>So that authors can exploit the forward-compatible parsing rules to
fantasai@8479 1434 assign fallback values, CSS renderers <strong>must</strong>
fantasai@8479 1435 treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore
fantasai@8479 1436 as appropriate</a>) any at-rules, properties, property values, keywords,
fantasai@8479 1437 and other syntactic constructs for which they have no usable level of
fantasai@8479 1438 support. In particular, user agents <strong>must not</strong> selectively
fantasai@8479 1439 ignore unsupported component values and honor supported values in a single
fantasai@8479 1440 multi-value property declaration: if any value is considered invalid
fantasai@8479 1441 (as unsupported values must be), CSS requires that the entire declaration
fantasai@8479 1442 be ignored.</p>
fantasai@8479 1443
fantasai@8479 1444 <h3 id="experimental">
fantasai@8479 1445 Experimental implementations</h3>
fantasai@8479 1446
fantasai@8479 1447 <p>To avoid clashes with future CSS features, the CSS2.1 specification
fantasai@8479 1448 reserves a <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
fantasai@8479 1449 syntax</a> for proprietary and experimental extensions to CSS.
fantasai@8479 1450
fantasai@8479 1451 <p>Prior to a specification reaching the Candidate Recommendation stage
fantasai@8479 1452 in the W3C process, all implementations of a CSS feature are considered
fantasai@8479 1453 experimental. The CSS Working Group recommends that implementations
fantasai@8479 1454 use a vendor-prefixed syntax for such features, including those in
fantasai@8479 1455 W3C Working Drafts. This avoids incompatibilities with future changes
fantasai@8479 1456 in the draft.
fantasai@8479 1457 </p>
fantasai@8479 1458
fantasai@8479 1459 <h3 id="testing">
fantasai@8479 1460 Non-experimental implementations</h3>
fantasai@8479 1461
fantasai@8479 1462 <p>Once a specification reaches the Candidate Recommendation stage,
fantasai@8479 1463 non-experimental implementations are possible, and implementors should
fantasai@8479 1464 release an unprefixed implementation of any CR-level feature they
fantasai@8479 1465 can demonstrate to be correctly implemented according to spec.
fantasai@8479 1466
fantasai@8479 1467 <p>To establish and maintain the interoperability of CSS across
fantasai@8479 1468 implementations, the CSS Working Group requests that non-experimental
fantasai@8479 1469 CSS renderers submit an implementation report (and, if necessary, the
fantasai@8479 1470 testcases used for that implementation report) to the W3C before
fantasai@8479 1471 releasing an unprefixed implementation of any CSS features. Testcases
fantasai@8479 1472 submitted to W3C are subject to review and correction by the CSS
fantasai@8479 1473 Working Group.
fantasai@8479 1474
fantasai@8479 1475 <p>Further information on submitting testcases and implementation reports
fantasai@8479 1476 can be found from on the CSS Working Group's website at
fantasai@8479 1477 <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
fantasai@8479 1478 Questions should be directed to the
fantasai@8479 1479 <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
fantasai@8479 1480 mailing list.
fantasai@8479 1481
fantasai@8479 1482 <h2 class=no-num id="acknowledgments">
fantasai@8479 1483 Acknowledgments</h2>
ishida@1665 1484
ishida@1665 1485 <p>This specification would not have been possible without the help from:</p>
ishida@1665 1486
fantasai@8479 1487 <p>Stephen Deach, Martin Dürst,  Hideki Hiura(<span lang="ja">樋浦 秀樹</span>), Masayasu Ishikawa(<span lang="ja">石川
ishida@1665 1488 雅康</span>), Chris
fantasai@8479 1489 Pratley, Takao Suzuki(<span lang="ja">鈴木 孝雄</span>), Frank Yung-Fong Tang, Chris Thrasher, Masafumi Yabe<span lang="ja">家辺
ishida@1665 1490 勝文</span>), Steve Zilles.</p>
ishida@1665 1491
fantasai@8509 1492 <h2 class="no-num" id="changes">
fantasai@8509 1493 Changes</h2>
fantasai@8509 1494
fantasai@8509 1495 <p>The following major changes have been made since the previous Working Draft:
fantasai@8509 1496 <dl>
fantasai@8509 1497 <dt>Remove 'ruby-span' and mentions of <code>rbspan</code>.
fantasai@8509 1498 <dd>
fantasai@8509 1499 Explicit spanning is not used in HTML ruby in favor of implicit spanning.
fantasai@8509 1500 This can't handle some pathological double-sided spanning cases,
fantasai@8509 1501 but there seems to be no requirement for these at the moment.
fantasai@8509 1502 (For implementations that support full complex XHTML Ruby,
fantasai@8509 1503 they can imply spanning from the markup the same magic way
fantasai@8509 1504 that we handle cell spanning from tables. It doesn't seem
fantasai@8509 1505 necessary to include controls this in Level 1.)
fantasai@8509 1506
fantasai@8509 1507 <dt>Defer 'ruby-overhang' and ''ruby-align: line-end'' to Level 2.
fantasai@8509 1508 <dd>
fantasai@8509 1509 It's somewhat complicated, advanced feature.
fantasai@8509 1510 Proposal is to make this behavior UA-defined
fantasai@8509 1511 and provide some examples of acceptable options.
fantasai@8509 1512
fantasai@8509 1513 <dt>Close issue requesting 'display: rp': use ''display: none''.
fantasai@8509 1514 <dd>
fantasai@8509 1515 The i18nwg added an issue requesting a display value for &lt;rp> elements.
fantasai@8509 1516 They're supposed to be hidden when &tl;ruby> is displayed as ruby.
fantasai@8509 1517 But this is easily accomplished already with ''display: none''.
fantasai@8509 1518
fantasai@8509 1519 <dt>Change 'ruby-position' values to match 'text-emphasis-position'.
fantasai@8509 1520 <dd>
fantasai@8509 1521 Other than ''inter-character'', which we need to keep,
fantasai@8509 1522 it makes more sense to align ruby positions with 'text-emphasis-position',
fantasai@8509 1523 which can correctly handle various combinations of horizontal/vertical preferences.
fantasai@8509 1524
fantasai@8509 1525 <dt>Remove unused values of 'ruby-align'.
fantasai@8509 1526 <dd>
fantasai@8509 1527 'left', 'right', and 'end' are not needed.
fantasai@8509 1528
fantasai@8509 1529 <dt>Added 'ruby-merge' property to control jukugo rendering.
fantasai@8509 1530 <dd>
fantasai@8509 1531 This is a stylistic effect, not a structural one;
fantasai@8509 1532 the previous model assumed that it was structural and suggested handling it by changing markup. :(
fantasai@8509 1533
fantasai@8509 1534 <dt>Remove ''inline'' from 'ruby-position'.
fantasai@8509 1535 <dd>
fantasai@8509 1536 This is do-able via ''display: inline'' on all the ruby-related elements,
fantasai@8509 1537 see <a href="#default-inline">Appendix A</a>
fantasai@8509 1538
fantasai@8509 1539 <dt>Added <a href="#default-style">Default Style</a> rules
fantasai@8509 1540 <dd>
fantasai@8509 1541 As requested by i18nwg.
fantasai@8509 1542
fantasai@8509 1543 <dt>Wrote anonymous box generation rules
fantasai@8509 1544 <dd>
fantasai@8509 1545 And defined pairing of bases and annotations.
fantasai@8509 1546 Should now handle all the crazy proposed permutations of HTML ruby markup.
fantasai@8509 1547 </dl>
fantasai@8509 1548
fantasai@8479 1549 <h2 class=no-num id="references">
fantasai@8479 1550 References</h2>
ishida@1665 1551
fantasai@8479 1552 <h3 class="no-num" id="normative-references">
fantasai@8479 1553 Normative references</h3>
fantasai@8479 1554 <!--normative-->
ishida@1665 1555
fantasai@8479 1556 <h3 class="no-num" id="other-references">
fantasai@8479 1557 Other references</h3>
fantasai@8479 1558 <!--informative-->
ishida@1665 1559
fantasai@8479 1560 <h2 class="no-num" id="index">
fantasai@8479 1561 Index</h2>
fantasai@8479 1562 <!--index-->
ishida@1665 1563
fantasai@8479 1564 <h2 class="no-num" id="property-index">
fantasai@8479 1565 Property index</h2>
fantasai@8479 1566 <!-- properties -->
ishida@1665 1567
ishida@1665 1568 </body>
ishida@1665 1569 </html>
ishida@1665 1570 <!-- Keep this comment at the end of the file
ishida@1665 1571 Local variables:
ishida@1665 1572 mode: sgml
fantasai@8479 1573 sgml-declaration:"~/SGML/HTML4.decl"
ishida@1665 1574 sgml-default-doctype-name:"html"
ishida@1665 1575 sgml-minimize-attributes:t
ishida@1665 1576 sgml-nofill-elements:("pre" "style" "br")
fantasai@8479 1577 sgml-live-element-indicator:t
fantasai@8479 1578 sgml-omittag:nil
fantasai@8479 1579 sgml-shorttag:nil
fantasai@8479 1580 sgml-namecase-general:t
fantasai@8479 1581 sgml-general-insert-case:lower
fantasai@8479 1582 sgml-always-quote-attributes:t
fantasai@8479 1583 sgml-indent-step:nil
fantasai@8479 1584 sgml-indent-data:t
fantasai@8479 1585 sgml-parent-document:nil
fantasai@8479 1586 sgml-exposed-tags:nil
fantasai@8479 1587 sgml-local-catalogs:nil
fantasai@8479 1588 sgml-local-ecat-files:nil
ishida@1665 1589 End:
ishida@1665 1590 -->
fantasai@8479 1591

mercurial