Mon, 08 Jul 2013 18:16:37 -0700
[css-ruby] split out some details of inter-character layout, make containers unstyleable for now
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 Mon Jul 08 17:37:11 2013 -0700 1.2 +++ b/css-ruby/Overview.html Mon Jul 08 18:16:37 2013 -0700 1.3 @@ -213,11 +213,18 @@ 1.4 1.5 <li><a href="#ruby-layout"><span class=secno>2.6. </span> Ruby 1.6 layout</a> 1.7 - 1.8 - <li><a href="#line-breaking"><span class=secno>2.7. </span> Ruby box and 1.9 + <ul class=toc> 1.10 + <li><a href="#inter-character-layout"><span class=secno>2.6.1. </span> 1.11 + Inter-character ruby layout</a> 1.12 + </ul> 1.13 + 1.14 + <li><a href="#box-style"><span class=secno>2.7. </span> Styling Ruby 1.15 + Boxes </a> 1.16 + 1.17 + <li><a href="#line-breaking"><span class=secno>2.8. </span> Ruby box and 1.18 line breaking</a> 1.19 1.20 - <li><a href="#line-height"><span class=secno>2.8. </span> Ruby box and 1.21 + <li><a href="#line-height"><span class=secno>2.9. </span> Ruby box and 1.22 line stacking</a> 1.23 </ul> 1.24 1.25 @@ -788,8 +795,8 @@ 1.26 1.27 <p>When a ruby structure is laid out, its base level is laid out on the 1.28 line, aligned according to its ‘<code 1.29 - class=property>vertical-align</code>’ property exactly as if it were a 1.30 - regular sequence of <i>inline</i> boxes. Each <a 1.31 + class=property>vertical-align</code>’ property exactly as if its 1.32 + <i>bases</i> were a regular sequence of <i>inline</i> boxes. Each <a 1.33 href="#ruby-base-container-box"><i>ruby base container</i></a> is sized 1.34 and positioned to contain exactly the full height of its <a 1.35 href="#ruby-base-box"><i>ruby bases</i></a>. 1.36 @@ -808,23 +815,57 @@ 1.37 href="#ruby-annotation-box"><i>ruby annotations</i></a>. 1.38 1.39 <p>A ruby container (or fragment thereof) measures as wide as the content 1.40 - of its widest level. (In the case of ‘<code 1.41 - class=css>inter-character</code>’ annotations, they are spliced in and 1.42 - measured as part of the base level.) Similarly, <a 1.43 - href="#ruby-base-box"><i>ruby base boxes</i></a> and <a 1.44 - href="#ruby-annotation-box"><i>ruby annotation boxes</i></a> within a ruby 1.45 - “column” have the measure of the widest content in that “column”. 1.46 - In the case of spanning <i>annotations</i> (whether actually spanning or 1.47 - pretending to span per ‘<code class=property>ruby-collapse</code>’), 1.48 - the measures of the <a href="#ruby-annotation-box"><i>ruby annotation 1.49 - box</i></a> and the sum of its associated <a href="#ruby-base-box"><i>ruby 1.50 - base boxes</i></a> must match. 1.51 + of its widest level. Similarly, <a href="#ruby-base-box"><i>ruby base 1.52 + boxes</i></a> and <a href="#ruby-annotation-box"><i>ruby annotation 1.53 + boxes</i></a> within a ruby “column” have the measure of the widest 1.54 + content in that “column”. In the case of spanning <i>annotations</i> 1.55 + (whether actually spanning or pretending to span per ‘<code 1.56 + class=property>ruby-collapse</code>’), the measures of the <a 1.57 + href="#ruby-annotation-box"><i>ruby annotation box</i></a> and the sum of 1.58 + its associated <a href="#ruby-base-box"><i>ruby base boxes</i></a> must 1.59 + match. 1.60 1.61 <p>How the extra space is distributed when ruby content is narrower than 1.62 the measure of its box is specified by the ‘<a href="#ruby-align"><code 1.63 class=property>ruby-align</code></a>’ property. 1.64 1.65 - <h3 id=line-breaking><span class=secno>2.7. </span> Ruby box and line 1.66 + <h4 id=inter-character-layout><span class=secno>2.6.1. </span> 1.67 + Inter-character ruby layout</h4> 1.68 + 1.69 + <p>Inter-character annotations have special layout. When ‘<a 1.70 + href="#ruby-position"><code class=property>ruby-position</code></a>’ 1.71 + indicates ‘<code class=css>inter-character</code>’ annotations, the 1.72 + affected <i>annotation boxes</i> are spliced into and measured as part of 1.73 + the layout of the base level. The <a 1.74 + href="#ruby-base-container-box"><i>ruby base container</i></a> must be 1.75 + sized to include both the <i>base boxes</i> as well as the ‘<code 1.76 + class=css>inter-character</code>’ <i>annotation boxes</i> The affected 1.77 + <a href="#ruby-annotation-container-box"><i>ruby annotation 1.78 + container</i></a> is similarly sized so that its content box coincides 1.79 + with that of the <a href="#ruby-base-container-box"><i>ruby base 1.80 + container</i></a>. 1.81 + 1.82 + <p>For the purpose of laying out other levels of annotations, an ‘<code 1.83 + class=css>inter-character</code>’ annotation effectively becomes part of 1.84 + its base. <span class=issue>Or should it become a quasi-base between two 1.85 + bases?</span> A spanning ‘<code class=css>inter-character</code>’ 1.86 + annotation is placed after all the bases that it spans. 1.87 + 1.88 + <h3 id=box-style><span class=secno>2.7. </span> Styling Ruby Boxes</h3> 1.89 + 1.90 + <p>In most respects, ruby boxes can be styled similar to inline boxes. 1.91 + However, the UA is not required to support any of the box properties 1.92 + (borders, margins, padding), any of the background properties or outline 1.93 + properties, or any other property that illustrates the bounds of the box 1.94 + on <a href="#ruby-base-container-box"><i>ruby base container boxes</i></a> 1.95 + or <a href="#ruby-annotation-container-box"><i>ruby annotation container 1.96 + boxes</i></a>. The UA may implement these boxes simply as abstractions for 1.97 + inheritance and control over the layout of their contents. 1.98 + 1.99 + <p class=issue> Alternatively... use margins to control offsets? Or could 1.100 + line-height be adequate? Its centering behavior can be awkward. 1.101 + 1.102 + <h3 id=line-breaking><span class=secno>2.8. </span> Ruby box and line 1.103 breaking</h3> 1.104 1.105 <p>When there is not enough space for an entire <a 1.106 @@ -886,7 +927,7 @@ 1.107 breaking opportunity 1.108 </div> 1.109 1.110 - <h3 id=line-height><span class=secno>2.8. </span> Ruby box and line 1.111 + <h3 id=line-height><span class=secno>2.9. </span> Ruby box and line 1.112 stacking</h3> 1.113 1.114 <p>The ‘<code class=property>line-height</code>’ property controls
2.1 --- a/css-ruby/Overview.src.html Mon Jul 08 17:37:11 2013 -0700 2.2 +++ b/css-ruby/Overview.src.html Mon Jul 08 18:16:37 2013 -0700 2.3 @@ -491,7 +491,7 @@ 2.4 <p>When a ruby structure is laid out, 2.5 its base level is laid out on the line, 2.6 aligned according to its 'vertical-align' property 2.7 - exactly as if it were a regular sequence of <i>inline</i> boxes. 2.8 + exactly as if its <i>bases</i> were a regular sequence of <i>inline</i> boxes. 2.9 Each <i>ruby base container</i> is sized and positioned 2.10 to contain exactly the full height of its <i>ruby bases</i>. 2.11 2.12 @@ -506,8 +506,6 @@ 2.13 2.14 <p>A ruby container (or fragment thereof) 2.15 measures as wide as the content of its widest level. 2.16 - (In the case of ''inter-character'' annotations, 2.17 - they are spliced in and measured as part of the base level.) 2.18 Similarly, <i>ruby base boxes</i> and <i>ruby annotation boxes</i> 2.19 within a ruby “column” have the measure of the widest content in that “column”. 2.20 In the case of spanning <i>annotations</i> 2.21 @@ -519,6 +517,39 @@ 2.22 when ruby content is narrower than the measure of its box 2.23 is specified by the 'ruby-align' property. 2.24 2.25 +<h4 id="inter-character-layout"> 2.26 +Inter-character ruby layout</h4> 2.27 + 2.28 + <p>Inter-character annotations have special layout. 2.29 + When 'ruby-position' indicates ''inter-character'' annotations, the affected <i>annotation boxes</i> 2.30 + are spliced into and measured as part of the layout of the base level. 2.31 + The <i>ruby base container</i> must be sized to include both the <i>base boxes</i> 2.32 + as well as the ''inter-character'' <i>annotation boxes</i> 2.33 + The affected <i>ruby annotation container</i> is similarly sized 2.34 + so that its content box coincides with that of the <i>ruby base container</i>. 2.35 + 2.36 + <p>For the purpose of laying out other levels of annotations, 2.37 + an ''inter-character'' annotation effectively becomes part of its base. 2.38 + <span class="issue">Or should it become a quasi-base between two bases?</span> 2.39 + A spanning ''inter-character'' annotation is placed after 2.40 + all the bases that it spans. 2.41 + 2.42 +<h3 id="box-style"> 2.43 +Styling Ruby Boxes</h4> 2.44 + 2.45 + <p>In most respects, ruby boxes can be styled similar to inline boxes. 2.46 + However, the UA is not required to support 2.47 + any of the box properties (borders, margins, padding), 2.48 + any of the background properties or outline properties, 2.49 + or any other property that illustrates the bounds of the box 2.50 + on <i>ruby base container boxes</i> or <i>ruby annotation container boxes</i>. 2.51 + The UA may implement these boxes simply as abstractions for inheritance 2.52 + and control over the layout of their contents. 2.53 + 2.54 + <p class="issue"> 2.55 + Alternatively... use margins to control offsets? 2.56 + Or could line-height be adequate? Its centering behavior can be awkward. 2.57 + 2.58 <h3 id="line-breaking"> 2.59 Ruby box and line breaking</h3> 2.60