1.1 --- a/css-ruby/Overview.src.html Fri Jun 21 16:19:24 2013 -0700 1.2 +++ b/css-ruby/Overview.src.html Fri Jun 21 23:18:37 2013 -0700 1.3 @@ -381,7 +381,69 @@ 1.4 1.5 <p class="issue">This shouldn't belong in Level 1. But HTML5 allows it, so we have to handle it. Yay HTML5. 1.6 1.7 -<h3 id="ruby-line-breaking"> 1.8 +<h3 id="white-space"> 1.9 +White Space</h3> 1.10 + 1.11 + <p class="issue">I'm unsure exactly where space should be trimmed. :/ 1.12 + But pretty sure we need to keep spaces between things, 1.13 + otherwise ruby only works for CJK. 1.14 + 1.15 + <p><i>Collapsible</i> white space within a ruby structure is discarded 1.16 + at the beginning and end of a <i>ruby container</i>, 1.17 + 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. 1.18 + Between <i>ruby segments</i>, between <i>ruby bases</i>, and between <i>ruby annotations</i>, however, 1.19 + white space is not discarded. 1.20 + If such white space is <i>collapsible</i>, it will collapse 1.21 + following the standard <a href="http://www.w3.org/TR/css3-text/#white-space-rules">white space processing rules</a>. [[!CSS3-TEXT]] 1.22 + Between <i>ruby segments</i>, however, 1.23 + the contextual text for determining collapsing behavior is given by the <i>ruby bases</i> on either side, 1.24 + not the text on either side of the white space in the source document. 1.25 + 1.26 + <div class="note"> 1.27 + <p>Note that the white space processing rules 1.28 + cause a white space sequence containing a <i>segment break</i> (such as a line feed) 1.29 + to <a href="http://www.w3.org/TR/css3-text/#line-break-transform">collapse to nothing</a> between CJK characters. 1.30 + This means that CJK ruby can safely use white space for indentation of the ruby markup. 1.31 + For example, the following markup will display without any spaces: 1.32 + <pre> 1.33 +<!-- --><ruby> 1.34 +<!-- --> <rb>東</rb><rb>京</rb> 1.35 +<!-- --> <rt>とう</rt><rt>きょう</rt> 1.36 +<!-- --></ruby></pre> 1.37 + <p>However, this markup will: 1.38 +<!-- --><ruby> 1.39 +<!-- --> <rb>東</rb> <rb>京</rb> 1.40 +<!-- --> <rt>とう</rt> <rt>きょう</rt> 1.41 +<!-- --></ruby></pre> 1.42 + </div> 1.43 + 1.44 + <p>Any preserved white space is then wrapped in an anonymous box belonging to 1.45 + the <i>ruby base container</i> (if between <i>ruby bases</i>), 1.46 + <i>ruby annotation container</i> (if between <i>ruby annotations</i>), 1.47 + or <i>ruby container</i> (if between <i>ruby segments</i>). 1.48 + In the latter case, the text is considered part of the <i>base level</i>. 1.49 + This box does not take part in pairing. 1.50 + It merely ensures separation between adjacent bases/annotations. 1.51 + 1.52 + <div class="example"> 1.53 + <p>These rules allow ruby to be used with space-separated scripts such as Latin. 1.54 + For example, 1.55 + <pre> 1.56 +<!-- --><ruby> 1.57 +<!-- --> <rb>W</rb><rb>W</rb><rb>W</rb> 1.58 +<!-- --> <rt>World</rt> <rt>Wide</rt> <rt>Web</rt> 1.59 +<!-- --></ruby></pre> 1.60 + <p>They also ensure that annotated white space is preserved. For example, 1.61 + <pre> 1.62 +<!-- --><ruby> 1.63 +<!-- --> <rb>Aerith</rb><rb> </rb><rb>Gainsboro</rb> 1.64 +<!-- --> <rt>エアリス</rt><rt>・</rt><rt>ゲインズブール</rt> 1.65 +<!-- --></ruby></pre> 1.66 + </div> 1.67 + 1.68 + <p class="issue">Specify how this impacts layout, or not. 1.69 + 1.70 +<h3 id="line-breaking"> 1.71 Ruby box and line breaking</h3> 1.72 1.73 <p>When there is not enough space for an entire <i>ruby container</i> to fit on the line,