[css-ruby] Some fixup in the line breaking section

Wed, 10 Jul 2013 19:08:33 -0700

author
fantasai <fantasai.cvs@inkedblade.net>
date
Wed, 10 Jul 2013 19:08:33 -0700
changeset 8682
9cea024667c6
parent 8681
dd4d857e0029
child 8683
7236acf0b724

[css-ruby] Some fixup in the line breaking 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	Wed Jul 10 14:39:43 2013 -0700
     1.2 +++ b/css-ruby/Overview.html	Wed Jul 10 19:08:33 2013 -0700
     1.3 @@ -20,7 +20,7 @@
     1.4  
     1.5    <meta content="CSS Ruby Module Level 1" name=dcterms.title>
     1.6    <meta content=text name=dcterms.type>
     1.7 -  <meta content=2013-07-09 name=dcterms.date>
     1.8 +  <meta content=2013-07-11 name=dcterms.date>
     1.9    <meta content="Elika J. Etemad" name=dcterms.creator>
    1.10    <meta content="Koji Ishii" name=dcterms.creator>
    1.11    <meta content="Richard Ishida" name=dcterms.creator>
    1.12 @@ -41,8 +41,8 @@
    1.13     <h1 class=p-name>CSS Ruby Module Level 1</h1>
    1.14  
    1.15     <h2 class="no-num no-toc" id=longstatus-date->Editor's Draft <time
    1.16 -    class=dt-updated datetime=20130709> 9 July 2013</time>
    1.17 -    <!-- for HTML4 doctype: <span class="value-title" title="20130709"> 9 July 2013</span></span> --></h2>
    1.18 +    class=dt-updated datetime=20130711>11 July 2013</time>
    1.19 +    <!-- for HTML4 doctype: <span class="value-title" title="20130711">11 July 2013</span></span> --></h2>
    1.20  
    1.21     <dl>
    1.22      <dt>This version:
    1.23 @@ -221,8 +221,15 @@
    1.24       <li><a href="#box-style"><span class=secno>2.7. </span> Styling Ruby
    1.25        Boxes </a>
    1.26  
    1.27 -     <li><a href="#line-breaking"><span class=secno>2.8. </span> Ruby box and
    1.28 +     <li><a href="#line-breaks"><span class=secno>2.8. </span> Ruby box and
    1.29        line breaking</a>
    1.30 +      <ul class=toc>
    1.31 +       <li><a href="#break-between"><span class=secno>2.8.1. </span> Breaking
    1.32 +        between bases</a>
    1.33 +
    1.34 +       <li><a href="#break-within"><span class=secno>2.8.2. </span> Breaking
    1.35 +        within bases</a>
    1.36 +      </ul>
    1.37  
    1.38       <li><a href="#line-height"><span class=secno>2.9. </span> Ruby box and
    1.39        line stacking</a>
    1.40 @@ -857,29 +864,51 @@
    1.41     However, the UA is not required to support any of the box properties
    1.42     (borders, margins, padding), any of the background properties or outline
    1.43     properties, or any other property that illustrates the bounds of the box
    1.44 -   on <a href="#ruby-base-container-box"><i>ruby base container boxes</i></a>
    1.45 -   or <a href="#ruby-annotation-container-box"><i>ruby annotation container
    1.46 -   boxes</i></a>. The UA may implement these boxes simply as abstractions for
    1.47 -   inheritance and control over the layout of their contents.
    1.48 +   on <a href="#ruby-base-container-box"><i>ruby base container
    1.49 +   boxes</i></a>, <a href="#ruby-annotation-container-box"><i>ruby annotation
    1.50 +   container boxes</i></a>, or <a href="#nested-pairing">ruby-internal
    1.51 +   <i>ruby container boxes</i></a>. The UA may implement these boxes simply
    1.52 +   as abstractions for inheritance and control over the layout of their
    1.53 +   contents.
    1.54  
    1.55    <p class=issue> Alternatively... use margins to control offsets? Or could
    1.56     line-height be adequate? Its centering behavior can be awkward.
    1.57  
    1.58 -  <h3 id=line-breaking><span class=secno>2.8. </span> Ruby box and line
    1.59 +  <h3 id=line-breaks><span class=secno>2.8. </span> Ruby box and line
    1.60     breaking</h3>
    1.61  
    1.62    <p>When there is not enough space for an entire <a
    1.63     href="#ruby-container-box"><i>ruby container</i></a> to fit on the line,
    1.64 -   the ruby may be broken wherever all levels allow a break. In typical
    1.65 -   cases, line breaks are forbidden within each <a
    1.66 -   href="#ruby-base-box"><i>ruby base</i></a> and <a
    1.67 -   href="#ruby-annotation-box"><i>ruby annotation</i></a>, so the <a
    1.68 +   the ruby may be broken wherever the base level allows a break. Ruby most
    1.69 +   often breaks between base-annotation sets, but if the line-breaking rules
    1.70 +   allow it, can also break within a <a href="#ruby-base-box"><i>ruby
    1.71 +   base</i></a> (and, in parallel, its associated <i>annotation boxes</i>).
    1.72 +
    1.73 +  <p>Whenever ruby breaks across lines, <a
    1.74 +   href="#ruby-annotation-box"><i>ruby annotations</i></a> must stay with
    1.75 +   their respective <i>bases</i>. The line <em>must not</em> break between a
    1.76 +   <a href="#ruby-base-box"><i>ruby base</i></a> and its <i>annotations</i>,
    1.77 +   even in the case of ‘<code class=css>inter-character</code>’
    1.78 +   <i>annotations</i>.
    1.79 +
    1.80 +  <div class=figure> <img
    1.81 +   alt="Diagram showing the line breaking opportunity in a &#34;Bopomofo&#34; ruby"
    1.82 +   src="images/r-break-b.gif">
    1.83 +   <p class=caption>‘<code class=css>inter-character</code>’ ruby line
    1.84 +    breaking opportunity
    1.85 +  </div>
    1.86 +
    1.87 +  <h4 id=break-between><span class=secno>2.8.1. </span> Breaking between
    1.88 +   bases</h4>
    1.89 +
    1.90 +  <p>In typical cases, <a href="#ruby-base-box"><i>ruby base boxes</i></a>
    1.91 +   and <a href="#ruby-annotation-box"><i>ruby annotation boxes</i></a> are
    1.92 +   styled to forbid internal line wrapping and do not contain forced breaks.
    1.93 +   (See <a href="#default-stylesheet">Appendix A</a>.) In such cases the <a
    1.94     href="#ruby-container-box"><i>ruby container</i></a> can only break
    1.95     between adjacent <a href="#ruby-base-box"><i>ruby bases</i></a>, and only
    1.96     if no <a href="#ruby-annotation-box"><i>ruby annotations</i></a> span
    1.97 -   those <a href="#ruby-base-box"><i>ruby bases</i></a>. Whenever ruby breaks
    1.98 -   across lines, <a href="#ruby-annotation-box"><i>ruby annotations</i></a>
    1.99 -   <em>must stay with their respective bases. </em>
   1.100 +   those <a href="#ruby-base-box"><i>ruby bases</i></a>.
   1.101  
   1.102    <div class=figure>
   1.103     <p><img
   1.104 @@ -892,8 +921,9 @@
   1.105    <p>Whether ruby can break between two adjacent <a
   1.106     href="#ruby-base-box"><i>ruby bases</i></a> is controlled by normal
   1.107     line-breaking rules for the affected text, exactly as if the <a
   1.108 -   href="#ruby-base-box"><i>ruby bases</i></a> were regular <i>inline</i>
   1.109 -   boxes.
   1.110 +   href="#ruby-base-box"><i>ruby bases</i></a> were adjacent <i>inline</i>
   1.111 +   boxes. (The annotations are ignored when determining soft wrap
   1.112 +   opportunities for the base level.)
   1.113  
   1.114    <div class=example>
   1.115     <p>For example, if two adjacent ruby bases are “蝴” and “蝶”,
   1.116 @@ -901,11 +931,14 @@
   1.117      break between two Han characters. However, if ‘<code
   1.118      class=property>word-break</code>’ is ‘<code
   1.119      class=css>keep-all</code>’, that line break is forbidden.
   1.120 +
   1.121 +   <pre>&lt;ruby>蝴&lt;rt>hú&lt;/rt>蝶&lt;rt>dié&lt;/rt></pre>
   1.122    </div>
   1.123  
   1.124    <p>Inter-base white space is significant for evaluating line break
   1.125     opportunities between <a href="#ruby-base-box"><i>ruby bases</i></a>. As
   1.126     with white space between inlines, it collapses when the line breaks there.
   1.127 +   Similarly, annotation white space is also trimmed at a line break.
   1.128  
   1.129    <div class=example>
   1.130     <p>For example, given the following markup:
   1.131 @@ -913,19 +946,18 @@
   1.132     <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.133  
   1.134     <p>Due to the space, the line may break between “one” and “two“.
   1.135 -    If the line breaks there, that space disappears, in accordance with
   1.136 -    standard CSS white space processing rules. [[CSS3-TEXT]]
   1.137 +    If the line breaks there, that space—and the space between “1” and
   1.138 +    “2”—disappears, in accordance with standard CSS white space
   1.139 +    processing rules. <a href="#CSS3TEXT"
   1.140 +    rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a>
   1.141    </div>
   1.142  
   1.143 -  <p>The line <em>must not</em> break between a <a
   1.144 -   href="#ruby-base-box"><i>ruby base</i></a> and its annotations.
   1.145 -
   1.146 -  <div class=figure> <img
   1.147 -   alt="Diagram showing the line breaking opportunity in a &#34;Bopomofo&#34; ruby"
   1.148 -   src="images/r-break-b.gif">
   1.149 -   <p class=caption>‘<code class=css>inter-character</code>’ ruby line
   1.150 -    breaking opportunity
   1.151 -  </div>
   1.152 +  <h4 id=break-within><span class=secno>2.8.2. </span> Breaking within bases</h4>
   1.153 +
   1.154 +  <p class=issue>Fill in this section...
   1.155 +
   1.156 +  <p>There are no line breaking opportunities within ‘<code
   1.157 +   class=css>inter-character</code>’ <i>annotations</i>.
   1.158  
   1.159    <h3 id=line-height><span class=secno>2.9. </span> Ruby box and line
   1.160     stacking</h3>
     2.1 --- a/css-ruby/Overview.src.html	Wed Jul 10 14:39:43 2013 -0700
     2.2 +++ b/css-ruby/Overview.src.html	Wed Jul 10 19:08:33 2013 -0700
     2.3 @@ -542,7 +542,8 @@
     2.4  	any of the box properties (borders, margins, padding),
     2.5  	any of the background properties or outline properties,
     2.6  	or any other property that illustrates the bounds of the box
     2.7 -	on <i>ruby base container boxes</i> or <i>ruby annotation container boxes</i>.
     2.8 +	on <i>ruby base container boxes</i>, <i>ruby annotation container boxes</i>,
     2.9 +	or <a href="#nested-pairing">ruby-internal <i>ruby container boxes</i></a>.
    2.10  	The UA may implement these boxes simply as abstractions for inheritance
    2.11  	and control over the layout of their contents.
    2.12  
    2.13 @@ -550,16 +551,34 @@
    2.14  		Alternatively... use margins to control offsets?
    2.15  		Or could line-height be adequate? Its centering behavior can be awkward.
    2.16  
    2.17 -<h3 id="line-breaking">
    2.18 +<h3 id="line-breaks">
    2.19  Ruby box and line breaking</h3>
    2.20  
    2.21  	<p>When there is not enough space for an entire <i>ruby container</i> to fit on the line,
    2.22 -	the ruby may be broken wherever all levels allow a break.
    2.23 -	In typical cases, line breaks are forbidden within each <i>ruby base</i> and <i>ruby annotation</i>,
    2.24 -	so the <i>ruby container</i> can only break between adjacent <i>ruby bases</i>,
    2.25 +	the ruby may be broken wherever the base level allows a break.
    2.26 +	Ruby most often breaks between base-annotation sets,
    2.27 +	but if the line-breaking rules allow it, can also break within a <i>ruby base</i>
    2.28 +	(and, in parallel, its associated <i>annotation boxes</i>).
    2.29 +
    2.30 +	<p>Whenever ruby breaks across lines, <i>ruby annotations</i> must stay
    2.31 +	with their respective <i>bases</i>.
    2.32 +	The line <em>must not</em> break between a <i>ruby base</i> and its <i>annotations</i>,
    2.33 +	even in the case of ''inter-character'' <i>annotations</i>.
    2.34 +
    2.35 +	<div class="figure">
    2.36 +		<img src="images/r-break-b.gif"
    2.37 +		     alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
    2.38 +		<p class="caption">''inter-character'' ruby line breaking opportunity
    2.39 +	</div>
    2.40 +
    2.41 +<h4 id="break-between">
    2.42 +Breaking between bases</h4>
    2.43 +
    2.44 +	<p>In typical cases, <i>ruby base boxes</i> and <i>ruby annotation boxes</i>
    2.45 +	are styled to forbid internal line wrapping and do not contain forced breaks.
    2.46 +	(See <a href="#default-stylesheet">Appendix A</a>.)
    2.47 +	In such cases the <i>ruby container</i> can only break between adjacent <i>ruby bases</i>,
    2.48  	and only if no <i>ruby annotations</i> span those <i>ruby bases</i>.
    2.49 -	Whenever ruby breaks across lines, <i>ruby annotations</i>
    2.50 -	<em>must</i> stay with their respective bases.
    2.51  
    2.52  	<div class="figure">
    2.53  		<p><img src="images/r-break-a.gif"
    2.54 @@ -569,33 +588,35 @@
    2.55  
    2.56  	<p>Whether ruby can break between two adjacent <i>ruby bases</i>
    2.57  	is controlled by normal line-breaking rules for the affected text,
    2.58 -	exactly as if the <i>ruby bases</i> were regular <i>inline</i> boxes.
    2.59 +	exactly as if the <i>ruby bases</i> were adjacent <i>inline</i> boxes.
    2.60 +	(The annotations are ignored when determining soft wrap opportunities for the base level.)
    2.61  
    2.62  	<div class="example">
    2.63  		<p>For example, if two adjacent ruby bases are “蝴” and “蝶”,
    2.64  		the line may break between them,
    2.65  		because lines are normally allowed to break between two Han characters.
    2.66  		However, if 'word-break' is ''keep-all'', that line break is forbidden.
    2.67 +		<pre>&lt;ruby>蝴&lt;rt>hú&lt;/rt>蝶&lt;rt>dié&lt;/rt></pre>
    2.68  	</div>
    2.69  
    2.70  	<p>Inter-base white space is significant for evaluating line break opportunities between <i>ruby bases</i>.
    2.71  	As with white space between inlines, it collapses when the line breaks there.
    2.72 +	Similarly, annotation white space is also trimmed at a line break.
    2.73  
    2.74  	<div class="example">
    2.75  		<p>For example, given the following markup:
    2.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>
    2.77  		<p>Due to the space, the line may break between “one” and “two“.
    2.78 -		If the line breaks there, that space disappears,
    2.79 -		in accordance with standard CSS white space processing rules. [[CSS3-TEXT]]
    2.80 +		If the line breaks there, that space&mdash;and the space between “1” and “2”&mdash;disappears,
    2.81 +		in accordance with standard CSS white space processing rules. [[CSS3TEXT]]
    2.82  	</div>
    2.83  
    2.84 -	<p>The line <em>must not</em> break between a <i>ruby base</i> and its annotations.
    2.85 +<h4 id="break-within">
    2.86 +Breaking within bases</h4>
    2.87  
    2.88 -	<div class="figure">
    2.89 -		<img src="images/r-break-b.gif"
    2.90 -		     alt='Diagram showing the line breaking opportunity in a "Bopomofo" ruby'>
    2.91 -		<p class="caption">''inter-character'' ruby line breaking opportunity
    2.92 -	</div>
    2.93 +	<p class="issue">Fill in this section...
    2.94 +
    2.95 +	<p>There are no line breaking opportunities within ''inter-character'' <i>annotations</i>.
    2.96  
    2.97  <h3 id="line-height">
    2.98  Ruby box and line stacking</h3>

mercurial