@@ -213,11 +213,18 @@ <h2 class="no-num no-toc" id=contents> Table of Contents</h2>
213213
214214 < li > < a href ="#ruby-layout "> < span class =secno > 2.6. </ span > Ruby
215215 layout</ a >
216+ < ul class =toc >
217+ < li > < a href ="#inter-character-layout "> < span class =secno > 2.6.1. </ span >
218+ Inter-character ruby layout</ a >
219+ </ ul >
220+
221+ < li > < a href ="#box-style "> < span class =secno > 2.7. </ span > Styling Ruby
222+ Boxes </ a >
216223
217- < li > < a href ="#line-breaking "> < span class =secno > 2.7 . </ span > Ruby box and
224+ < li > < a href ="#line-breaking "> < span class =secno > 2.8 . </ span > Ruby box and
218225 line breaking</ a >
219226
220- < li > < a href ="#line-height "> < span class =secno > 2.8 . </ span > Ruby box and
227+ < li > < a href ="#line-height "> < span class =secno > 2.9 . </ span > Ruby box and
221228 line stacking</ a >
222229 </ ul >
223230
@@ -788,8 +795,8 @@ <h3 id=ruby-layout><span class=secno>2.6. </span> Ruby layout</h3>
788795
789796 < p > When a ruby structure is laid out, its base level is laid out on the
790797 line, aligned according to its ‘< code
791- class =property > vertical-align</ code > ’ property exactly as if it were a
792- regular sequence of < i > inline</ i > boxes. Each < a
798+ class =property > vertical-align</ code > ’ property exactly as if its
799+ < i > bases </ i > were a regular sequence of < i > inline</ i > boxes. Each < a
793800 href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > is sized
794801 and positioned to contain exactly the full height of its < a
795802 href ="#ruby-base-box "> < i > ruby bases</ i > </ a > .
@@ -808,23 +815,57 @@ <h3 id=ruby-layout><span class=secno>2.6. </span> Ruby layout</h3>
808815 href ="#ruby-annotation-box "> < i > ruby annotations</ i > </ a > .
809816
810817 < p > A ruby container (or fragment thereof) measures as wide as the content
811- of its widest level. (In the case of ‘< code
812- class =css > inter-character</ code > ’ annotations, they are spliced in and
813- measured as part of the base level.) Similarly, < a
814- href ="#ruby-base-box "> < i > ruby base boxes</ i > </ a > and < a
815- href ="#ruby-annotation-box "> < i > ruby annotation boxes</ i > </ a > within a ruby
816- “column” have the measure of the widest content in that “column”.
817- In the case of spanning < i > annotations</ i > (whether actually spanning or
818- pretending to span per ‘< code class =property > ruby-collapse</ code > ’),
819- the measures of the < a href ="#ruby-annotation-box "> < i > ruby annotation
820- box</ i > </ a > and the sum of its associated < a href ="#ruby-base-box "> < i > ruby
821- base boxes</ i > </ a > must match.
818+ of its widest level. Similarly, < a href ="#ruby-base-box "> < i > ruby base
819+ boxes</ i > </ a > and < a href ="#ruby-annotation-box "> < i > ruby annotation
820+ boxes</ i > </ a > within a ruby “column” have the measure of the widest
821+ content in that “column”. In the case of spanning < i > annotations</ i >
822+ (whether actually spanning or pretending to span per ‘< code
823+ class =property > ruby-collapse</ code > ’), the measures of the < a
824+ href ="#ruby-annotation-box "> < i > ruby annotation box</ i > </ a > and the sum of
825+ its associated < a href ="#ruby-base-box "> < i > ruby base boxes</ i > </ a > must
826+ match.
822827
823828 < p > How the extra space is distributed when ruby content is narrower than
824829 the measure of its box is specified by the ‘< a href ="#ruby-align "> < code
825830 class =property > ruby-align</ code > </ a > ’ property.
826831
827- < h3 id =line-breaking > < span class =secno > 2.7. </ span > Ruby box and line
832+ < h4 id =inter-character-layout > < span class =secno > 2.6.1. </ span >
833+ Inter-character ruby layout</ h4 >
834+
835+ < p > Inter-character annotations have special layout. When ‘< a
836+ href ="#ruby-position "> < code class =property > ruby-position</ code > </ a > ’
837+ indicates ‘< code class =css > inter-character</ code > ’ annotations, the
838+ affected < i > annotation boxes</ i > are spliced into and measured as part of
839+ the layout of the base level. The < a
840+ href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > must be
841+ sized to include both the < i > base boxes</ i > as well as the ‘< code
842+ class =css > inter-character</ code > ’ < i > annotation boxes</ i > The affected
843+ < a href ="#ruby-annotation-container-box "> < i > ruby annotation
844+ container</ i > </ a > is similarly sized so that its content box coincides
845+ with that of the < a href ="#ruby-base-container-box "> < i > ruby base
846+ container</ i > </ a > .
847+
848+ < p > For the purpose of laying out other levels of annotations, an ‘< code
849+ class =css > inter-character</ code > ’ annotation effectively becomes part of
850+ its base. < span class =issue > Or should it become a quasi-base between two
851+ bases?</ span > A spanning ‘< code class =css > inter-character</ code > ’
852+ annotation is placed after all the bases that it spans.
853+
854+ < h3 id =box-style > < span class =secno > 2.7. </ span > Styling Ruby Boxes</ h3 >
855+
856+ < p > In most respects, ruby boxes can be styled similar to inline boxes.
857+ However, the UA is not required to support any of the box properties
858+ (borders, margins, padding), any of the background properties or outline
859+ properties, or any other property that illustrates the bounds of the box
860+ on < a href ="#ruby-base-container-box "> < i > ruby base container boxes</ i > </ a >
861+ or < a href ="#ruby-annotation-container-box "> < i > ruby annotation container
862+ boxes</ i > </ a > . The UA may implement these boxes simply as abstractions for
863+ inheritance and control over the layout of their contents.
864+
865+ < p class =issue > Alternatively... use margins to control offsets? Or could
866+ line-height be adequate? Its centering behavior can be awkward.
867+
868+ < h3 id =line-breaking > < span class =secno > 2.8. </ span > Ruby box and line
828869 breaking</ h3 >
829870
830871 < p > When there is not enough space for an entire < a
@@ -886,7 +927,7 @@ <h3 id=line-breaking><span class=secno>2.7. </span> Ruby box and line
886927 breaking opportunity
887928 </ div >
888929
889- < h3 id =line-height > < span class =secno > 2.8 . </ span > Ruby box and line
930+ < h3 id =line-height > < span class =secno > 2.9 . </ span > Ruby box and line
890931 stacking</ h3 >
891932
892933 < p > The ‘< code class =property > line-height</ code > ’ property controls
0 commit comments