Fri, 13 Sep 2013 13:55:31 -0700
[css-ruby] Clarifications to white space collapsing section
css-ruby/Overview.html | file | annotate | diff | comparison | revisions | |
css-ruby/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css-ruby/Overview.html Fri Sep 13 22:55:51 2013 +0200 1.2 +++ b/css-ruby/Overview.html Fri Sep 13 13:55:31 2013 -0700 1.3 @@ -727,29 +727,41 @@ 1.4 1.5 <h3 id=white-space><span class=secno>2.5. </span> White Space</h3> 1.6 1.7 - <p class=issue>I'm unsure exactly where space should be trimmed. :/ But 1.8 - pretty sure we need to keep spaces between things, otherwise ruby only 1.9 - works for CJK. 1.10 - 1.11 - <p><i>Collapsible</i> white space within a ruby structure is discarded at 1.12 - the beginning and end of a <a href="#ruby-container-box"><i>ruby 1.13 - container</i></a>, <a href="#ruby-annotation-container-box"><i>ruby 1.14 - annotation container</i></a>, or <a 1.15 - href="#ruby-base-container-box"><i>ruby base container</i></a>, and at the 1.16 - beginning/end of a <a href="#ruby-annotation-box"><i>ruby annotation 1.17 - box</i></a> or <a href="#ruby-base-box"><i>ruby base box</i></a> if white 1.18 - space is not its only contents. Between <a href="#ruby-segments"><i>ruby 1.19 - segments</i></a>, between <a href="#ruby-base-box"><i>ruby bases</i></a>, 1.20 - and between <a href="#ruby-annotation-box"><i>ruby annotations</i></a>, 1.21 - however, white space is not discarded. If such white space is 1.22 - <i>collapsible</i>, it will collapse following the standard <a 1.23 + <p><i>Collapsible</i> white space within a ruby structure is discarded 1.24 + 1.25 + <ul> 1.26 + <li>at the beginning and end of a <a href="#ruby-container-box"><i>ruby 1.27 + container</i></a>, <a href="#ruby-annotation-container-box"><i>ruby 1.28 + annotation container</i></a>, or <a 1.29 + href="#ruby-base-container-box"><i>ruby base container</i></a>, 1.30 + 1.31 + <li>at the beginning/end of a <a href="#ruby-annotation-box"><i>ruby 1.32 + annotation box</i></a> or <a href="#ruby-base-box"><i>ruby base 1.33 + box</i></a> if white space is not its only contents, 1.34 + 1.35 + <li>between a <a href="#ruby-base-container-box"><i>ruby base 1.36 + container</i></a> and its following <a 1.37 + href="#ruby-annotation-container-box"><i>ruby annotation 1.38 + container</i></a>, 1.39 + 1.40 + <li>between <a href="#ruby-annotation-container-box"><i>ruby annotation 1.41 + containers</i></a>. 1.42 + </ul> 1.43 + 1.44 + <p>Between <a href="#ruby-segments"><i>ruby segments</i></a>, between <a 1.45 + href="#ruby-base-box"><i>ruby bases</i></a>, and between <a 1.46 + href="#ruby-annotation-box"><i>ruby annotations</i></a>, however, white 1.47 + space is not discarded. 1.48 + 1.49 + <p>Where undiscarded white space is <i>collapsible</i>, it will collapse 1.50 + following the standard <a 1.51 href="http://www.w3.org/TR/css3-text/#white-space-rules">white space 1.52 processing rules</a>. <a href="#CSS3TEXT" 1.53 - rel=biblioentry>[CSS3TEXT]<!--{{!CSS3TEXT}}--></a> Between <a 1.54 - href="#ruby-segments"><i>ruby segments</i></a>, however, the contextual 1.55 - text for determining collapsing behavior is given by the <a 1.56 - href="#ruby-base-box"><i>ruby bases</i></a> on either side, not the text 1.57 - on either side of the white space in the source document. 1.58 + rel=biblioentry>[CSS3TEXT]<!--{{!CSS3TEXT}}--></a> For <i>collapsible</i> 1.59 + white space between <a href="#ruby-segments"><i>ruby segments</i></a>, 1.60 + however, the contextual text for determining collapsing behavior is given 1.61 + by the <a href="#ruby-base-box"><i>ruby bases</i></a> on either side, not 1.62 + the text on either side of the white space in the source document. 1.63 1.64 <div class=note> 1.65 <p>Note that the white space processing rules cause a white space sequence 1.66 @@ -765,12 +777,14 @@ 1.67 <!-- --> <rt>とう</rt><rt>きょう</rt> 1.68 <!-- --></ruby></pre> 1.69 1.70 - <p>However, this markup will: 1.71 + <p>However, white space that does not contain a <i>segment break</i> does 1.72 + not collapse completely away, so this markup will display with a space 1.73 + between the first and second ruby pairs: 1.74 1.75 <pre> 1.76 <!-- --><ruby> 1.77 <!-- --> <rb>東</rb> <rb>京</rb> 1.78 -<!-- --> <rt>とう</rt> <rt>きょう</rt> 1.79 +<!-- --> <rt>とう</rt> <rt>きょう</rt> 1.80 <!-- --></ruby></pre> 1.81 </div> 1.82 1.83 @@ -781,10 +795,12 @@ 1.84 (if between <a href="#ruby-annotation-box"><i>ruby annotations</i></a>), 1.85 or <a href="#ruby-container-box"><i>ruby container</i></a> (if between <a 1.86 href="#ruby-segments"><i>ruby segments</i></a>). In the latter case, the 1.87 - text is considered part of the <i>base level</i>. This box does not take 1.88 - part in pairing. It merely ensures separation between adjacent 1.89 + text is considered part of the <i>base level</i>. Such anonynmous boxes do 1.90 + not take part in pairing. They merely ensure separation between adjacent 1.91 bases/annotations. 1.92 1.93 + <p class=issue>Specify how these anonymous white space boxes impact layout. 1.94 + 1.95 <div class=example> 1.96 <p>These rules allow ruby to be used with space-separated scripts such as 1.97 Latin. For example, 1.98 @@ -804,8 +820,6 @@ 1.99 <!-- --></ruby></pre> 1.100 </div> 1.101 1.102 - <p class=issue>Specify how this impacts layout, or not. 1.103 - 1.104 <h3 id=ruby-layout><span class=secno>2.6. </span> Ruby layout</h3> 1.105 1.106 <p>When a ruby structure is laid out, its base level is laid out on the
2.1 --- a/css-ruby/Overview.src.html Fri Sep 13 22:55:51 2013 +0200 2.2 +++ b/css-ruby/Overview.src.html Fri Sep 13 13:55:31 2013 -0700 2.3 @@ -426,18 +426,20 @@ 2.4 <h3 id="white-space"> 2.5 White Space</h3> 2.6 2.7 - <p class="issue">I'm unsure exactly where space should be trimmed. :/ 2.8 - But pretty sure we need to keep spaces between things, 2.9 - otherwise ruby only works for CJK. 2.10 + <p><i>Collapsible</i> white space within a ruby structure is discarded 2.11 + <ul> 2.12 + <li>at the beginning and end of a <i>ruby container</i>, <i>ruby annotation container</i>, or <i>ruby base container</i>, 2.13 + <li>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, 2.14 + <li>between a <i>ruby base container</i> and its following <i>ruby annotation container</i>, 2.15 + <li>between <i>ruby annotation containers</i>. 2.16 + </ul> 2.17 2.18 - <p><i>Collapsible</i> white space within a ruby structure is discarded 2.19 - at the beginning and end of a <i>ruby container</i>, <i>ruby annotation container</i>, or <i>ruby base container</i>, 2.20 - 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. 2.21 - Between <i>ruby segments</i>, between <i>ruby bases</i>, and between <i>ruby annotations</i>, however, 2.22 + <p>Between <i>ruby segments</i>, between <i>ruby bases</i>, and between <i>ruby annotations</i>, however, 2.23 white space is not discarded. 2.24 - If such white space is <i>collapsible</i>, it will collapse 2.25 + 2.26 + <p>Where undiscarded white space is <i>collapsible</i>, it will collapse 2.27 following the standard <a href="http://www.w3.org/TR/css3-text/#white-space-rules">white space processing rules</a>. [[!CSS3TEXT]] 2.28 - Between <i>ruby segments</i>, however, 2.29 + For <i>collapsible</i> white space between <i>ruby segments</i>, however, 2.30 the contextual text for determining collapsing behavior is given by the <i>ruby bases</i> on either side, 2.31 not the text on either side of the white space in the source document. 2.32 2.33 @@ -452,11 +454,12 @@ 2.34 <!-- --> <rb>東</rb><rb>京</rb> 2.35 <!-- --> <rt>とう</rt><rt>きょう</rt> 2.36 <!-- --></ruby></pre> 2.37 - <p>However, this markup will: 2.38 + <p>However, white space that does not contain a <i>segment break</i> does not collapse completely away, 2.39 + so this markup will display with a space between the first and second ruby pairs: 2.40 <pre> 2.41 <!-- --><ruby> 2.42 <!-- --> <rb>東</rb> <rb>京</rb> 2.43 -<!-- --> <rt>とう</rt> <rt>きょう</rt> 2.44 +<!-- --> <rt>とう</rt> <rt>きょう</rt> 2.45 <!-- --></ruby></pre> 2.46 </div> 2.47 2.48 @@ -465,8 +468,10 @@ 2.49 <i>ruby annotation container</i> (if between <i>ruby annotations</i>), 2.50 or <i>ruby container</i> (if between <i>ruby segments</i>). 2.51 In the latter case, the text is considered part of the <i>base level</i>. 2.52 - This box does not take part in pairing. 2.53 - It merely ensures separation between adjacent bases/annotations. 2.54 + Such anonynmous boxes do not take part in pairing. 2.55 + They merely ensure separation between adjacent bases/annotations. 2.56 + 2.57 + <p class="issue">Specify how these anonymous white space boxes impact layout. 2.58 2.59 <div class="example"> 2.60 <p>These rules allow ruby to be used with space-separated scripts such as Latin. 2.61 @@ -484,8 +489,6 @@ 2.62 <!-- --></ruby></pre> 2.63 </div> 2.64 2.65 - <p class="issue">Specify how this impacts layout, or not. 2.66 - 2.67 <h3 id="ruby-layout"> 2.68 Ruby layout</h3> 2.69