css-ruby/Overview.src.html

changeset 8682
9cea024667c6
parent 8663
8f5483049df7
child 8833
0bd7993fcfef
     1.1 --- a/css-ruby/Overview.src.html	Wed Jul 10 14:39:43 2013 -0700
     1.2 +++ b/css-ruby/Overview.src.html	Wed Jul 10 19:08:33 2013 -0700
     1.3 @@ -542,7 +542,8 @@
     1.4  	any of the box properties (borders, margins, padding),
     1.5  	any of the background properties or outline properties,
     1.6  	or any other property that illustrates the bounds of the box
     1.7 -	on <i>ruby base container boxes</i> or <i>ruby annotation container boxes</i>.
     1.8 +	on <i>ruby base container boxes</i>, <i>ruby annotation container boxes</i>,
     1.9 +	or <a href="#nested-pairing">ruby-internal <i>ruby container boxes</i></a>.
    1.10  	The UA may implement these boxes simply as abstractions for inheritance
    1.11  	and control over the layout of their contents.
    1.12  
    1.13 @@ -550,16 +551,34 @@
    1.14  		Alternatively... use margins to control offsets?
    1.15  		Or could line-height be adequate? Its centering behavior can be awkward.
    1.16  
    1.17 -<h3 id="line-breaking">
    1.18 +<h3 id="line-breaks">
    1.19  Ruby box and line breaking</h3>
    1.20  
    1.21  	<p>When there is not enough space for an entire <i>ruby container</i> to fit on the line,
    1.22 -	the ruby may be broken wherever all levels allow a break.
    1.23 -	In typical cases, line breaks are forbidden within each <i>ruby base</i> and <i>ruby annotation</i>,
    1.24 -	so the <i>ruby container</i> can only break between adjacent <i>ruby bases</i>,
    1.25 +	the ruby may be broken wherever the base level allows a break.
    1.26 +	Ruby most often breaks between base-annotation sets,
    1.27 +	but if the line-breaking rules allow it, can also break within a <i>ruby base</i>
    1.28 +	(and, in parallel, its associated <i>annotation boxes</i>).
    1.29 +
    1.30 +	<p>Whenever ruby breaks across lines, <i>ruby annotations</i> must stay
    1.31 +	with their respective <i>bases</i>.
    1.32 +	The line <em>must not</em> break between a <i>ruby base</i> and its <i>annotations</i>,
    1.33 +	even in the case of ''inter-character'' <i>annotations</i>.
    1.34 +
    1.35 +	<div class="figure">
    1.36 +		<img src="images/r-break-b.gif"
    1.37 +		     alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
    1.38 +		<p class="caption">''inter-character'' ruby line breaking opportunity
    1.39 +	</div>
    1.40 +
    1.41 +<h4 id="break-between">
    1.42 +Breaking between bases</h4>
    1.43 +
    1.44 +	<p>In typical cases, <i>ruby base boxes</i> and <i>ruby annotation boxes</i>
    1.45 +	are styled to forbid internal line wrapping and do not contain forced breaks.
    1.46 +	(See <a href="#default-stylesheet">Appendix A</a>.)
    1.47 +	In such cases the <i>ruby container</i> can only break between adjacent <i>ruby bases</i>,
    1.48  	and only if no <i>ruby annotations</i> span those <i>ruby bases</i>.
    1.49 -	Whenever ruby breaks across lines, <i>ruby annotations</i>
    1.50 -	<em>must</i> stay with their respective bases.
    1.51  
    1.52  	<div class="figure">
    1.53  		<p><img src="images/r-break-a.gif"
    1.54 @@ -569,33 +588,35 @@
    1.55  
    1.56  	<p>Whether ruby can break between two adjacent <i>ruby bases</i>
    1.57  	is controlled by normal line-breaking rules for the affected text,
    1.58 -	exactly as if the <i>ruby bases</i> were regular <i>inline</i> boxes.
    1.59 +	exactly as if the <i>ruby bases</i> were adjacent <i>inline</i> boxes.
    1.60 +	(The annotations are ignored when determining soft wrap opportunities for the base level.)
    1.61  
    1.62  	<div class="example">
    1.63  		<p>For example, if two adjacent ruby bases are “蝴” and “蝶”,
    1.64  		the line may break between them,
    1.65  		because lines are normally allowed to break between two Han characters.
    1.66  		However, if 'word-break' is ''keep-all'', that line break is forbidden.
    1.67 +		<pre>&lt;ruby>蝴&lt;rt>hú&lt;/rt>蝶&lt;rt>dié&lt;/rt></pre>
    1.68  	</div>
    1.69  
    1.70  	<p>Inter-base white space is significant for evaluating line break opportunities between <i>ruby bases</i>.
    1.71  	As with white space between inlines, it collapses when the line breaks there.
    1.72 +	Similarly, annotation white space is also trimmed at a line break.
    1.73  
    1.74  	<div class="example">
    1.75  		<p>For example, given the following markup:
    1.76  		<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>
    1.77  		<p>Due to the space, the line may break between “one” and “two“.
    1.78 -		If the line breaks there, that space disappears,
    1.79 -		in accordance with standard CSS white space processing rules. [[CSS3-TEXT]]
    1.80 +		If the line breaks there, that space&mdash;and the space between “1” and “2”&mdash;disappears,
    1.81 +		in accordance with standard CSS white space processing rules. [[CSS3TEXT]]
    1.82  	</div>
    1.83  
    1.84 -	<p>The line <em>must not</em> break between a <i>ruby base</i> and its annotations.
    1.85 +<h4 id="break-within">
    1.86 +Breaking within bases</h4>
    1.87  
    1.88 -	<div class="figure">
    1.89 -		<img src="images/r-break-b.gif"
    1.90 -		     alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
    1.91 -		<p class="caption">''inter-character'' ruby line breaking opportunity
    1.92 -	</div>
    1.93 +	<p class="issue">Fill in this section...
    1.94 +
    1.95 +	<p>There are no line breaking opportunities within ''inter-character'' <i>annotations</i>.
    1.96  
    1.97  <h3 id="line-height">
    1.98  Ruby box and line stacking</h3>

mercurial