|
19 | 19 |
|
20 | 20 | <meta content="CSS Ruby Module Level 1" name=dcterms.title> |
21 | 21 | <meta content=text name=dcterms.type> |
22 | | - <meta content=2013-06-21 name=dcterms.date> |
| 22 | + <meta content=2013-06-22 name=dcterms.date> |
23 | 23 | <meta content="Elika J. Etemad" name=dcterms.creator> |
24 | 24 | <meta content="Koji Ishii" name=dcterms.creator> |
25 | 25 | <meta content="Richard Ishida" name=dcterms.creator> |
|
40 | 40 | <h1 class=p-name>CSS Ruby Module Level 1</h1> |
41 | 41 |
|
42 | 42 | <h2 class="no-num no-toc" id=longstatus-date->Editor's Draft <time |
43 | | - class=dt-updated datetime=20130621>21 June 2013</time> |
44 | | - <!-- for HTML4 doctype: <span class="value-title" title="20130621">21 June 2013</span></span> --></h2> |
| 43 | + class=dt-updated datetime=20130622>22 June 2013</time> |
| 44 | + <!-- for HTML4 doctype: <span class="value-title" title="20130622">22 June 2013</span></span> --></h2> |
45 | 45 |
|
46 | 46 | <dl> |
47 | 47 | <dt>This version: |
@@ -204,8 +204,11 @@ <h2 class="no-num no-toc" id=contents> Table of Contents</h2> |
204 | 204 | Ruby</a> |
205 | 205 | </ul> |
206 | 206 |
|
207 | | - <li><a href="#ruby-line-breaking"><span class=secno>2.4. </span> Ruby |
208 | | - box and line breaking</a> |
| 207 | + <li><a href="#white-space"><span class=secno>2.4. </span> White |
| 208 | + Space</a> |
| 209 | + |
| 210 | + <li><a href="#line-breaking"><span class=secno>2.5. </span> Ruby box and |
| 211 | + line breaking</a> |
209 | 212 | </ul> |
210 | 213 |
|
211 | 214 | <li><a href="#ruby-props"><span class=secno>3. </span> Ruby Properties</a> |
@@ -643,7 +646,81 @@ <h4 id=nested-pairing><span class=secno>2.3.1. </span> Nested Ruby</h4> |
643 | 646 | <p class=issue>This shouldn't belong in Level 1. But HTML5 allows it, so we |
644 | 647 | have to handle it. Yay HTML5. |
645 | 648 |
|
646 | | - <h3 id=ruby-line-breaking><span class=secno>2.4. </span> Ruby box and line |
| 649 | + <h3 id=white-space><span class=secno>2.4. </span> White Space</h3> |
| 650 | + |
| 651 | + <p class=issue>I'm unsure exactly where space should be trimmed. :/ But |
| 652 | + pretty sure we need to keep spaces between things, otherwise ruby only |
| 653 | + works for CJK. |
| 654 | + |
| 655 | + <p><i>Collapsible</i> white space within a ruby structure is discarded at |
| 656 | + the beginning and end of a <a href="#ruby-container-box"><i>ruby |
| 657 | + container</i></a>, and at the beginning/end of a <a |
| 658 | + href="#ruby-annotation-box"><i>ruby annotation box</i></a> or <a |
| 659 | + href="#ruby-base-box"><i>ruby base box</i></a> if white space is not its |
| 660 | + only contents. Between <a href="#ruby-segments"><i>ruby segments</i></a>, |
| 661 | + between <a href="#ruby-base-box"><i>ruby bases</i></a>, and between <a |
| 662 | + href="#ruby-annotation-box"><i>ruby annotations</i></a>, however, white |
| 663 | + space is not discarded. If such the white space is <i>collapsible</i>, it |
| 664 | + will collapse following the standard <a |
| 665 | + href="http://www.w3.org/TR/css3-text/#white-space-rules">white space |
| 666 | + processing rules</a>. [[!CSS3-TEXT]] Between <a |
| 667 | + href="#ruby-segments"><i>ruby segments</i></a>, however, the contextual |
| 668 | + text for determining collapsing behavior is given by the <a |
| 669 | + href="#ruby-base-box"><i>ruby bases</i></a> on either side, not the text |
| 670 | + on either side of the white space in the source document. |
| 671 | + |
| 672 | + <div class=note> |
| 673 | + <p>Note that the white space processing rules cause a white space sequence |
| 674 | + containing a <i>segment break</i> (such as a line feed) to <a |
| 675 | + href="http://www.w3.org/TR/css3-text/#line-break-transform">collapse to |
| 676 | + nothing</a> between CJK characters. This means that CJK ruby can safely |
| 677 | + use white space for indentation of the ruby markup. For example, the |
| 678 | + following markup will display without any spaces: |
| 679 | + |
| 680 | + <pre> |
| 681 | +<!-- --><ruby> |
| 682 | +<!-- --> <rb>東</rb><rb>京</rb> |
| 683 | +<!-- --> <rt>とう</rt><rt>きょう</rt> |
| 684 | +<!-- --></ruby></pre> |
| 685 | + |
| 686 | + <p>However, this markup will: <!-- --><ruby> <!-- --> |
| 687 | + <rb>東</rb> <rb>京</rb> <!-- --> <rt>とう</rt> |
| 688 | + <rt>きょう</rt> <!-- --></ruby> |
| 689 | + </div> |
| 690 | + |
| 691 | + <p>Any preserved white space is then wrapped in an anonymous box belonging |
| 692 | + to the <a href="#ruby-base-container-box"><i>ruby base container</i></a> |
| 693 | + (if between <a href="#ruby-base-box"><i>ruby bases</i></a>), <a |
| 694 | + href="#ruby-annotation-container-box"><i>ruby annotation container</i></a> |
| 695 | + (if between <a href="#ruby-annotation-box"><i>ruby annotations</i></a>), |
| 696 | + or <a href="#ruby-container-box"><i>ruby container</i></a> (if between <a |
| 697 | + href="#ruby-segments"><i>ruby segments</i></a>). In the latter case, the |
| 698 | + text is considered part of the <i>base level</i>. This box does not take |
| 699 | + part in pairing. It merely ensures separation between adjacent |
| 700 | + bases/annotations. |
| 701 | + |
| 702 | + <div class=example> |
| 703 | + <p>These rules allow ruby to be used with space-separated scripts such as |
| 704 | + Latin. For example, |
| 705 | + |
| 706 | + <pre> |
| 707 | +<!-- --><ruby> |
| 708 | +<!-- --> <rb>W</rb><rb>W</rb><rb>W</rb> |
| 709 | +<!-- --> <rt>World</rt> <rt>Wide</rt> <rt>Web</rt> |
| 710 | +<!-- --></ruby></pre> |
| 711 | + |
| 712 | + <p>They also ensure that annotated white space is preserved. For example, |
| 713 | + |
| 714 | + <pre> |
| 715 | +<!-- --><ruby> |
| 716 | +<!-- --> <rb>Aerith</rb><rb> </rb><rb>Gainsboro</rb> |
| 717 | +<!-- --> <rt>エアリス</rt><rt>・</rt><rt>ゲインズブール</rt> |
| 718 | +<!-- --></ruby></pre> |
| 719 | + </div> |
| 720 | + |
| 721 | + <p class=issue>Specify how this impacts layout, or not. |
| 722 | + |
| 723 | + <h3 id=line-breaking><span class=secno>2.5. </span> Ruby box and line |
647 | 724 | breaking</h3> |
648 | 725 |
|
649 | 726 | <p>When there is not enough space for an entire <a |
|
0 commit comments