Skip to content

Commit 69119d8

Browse files
committed
[css-ruby] Clarifications & fixes to nested ruby rules.
--HG-- extra : rebase_source : c182ca9b68e4c89cb7918b1035e42aaaf27ec407
1 parent 4a4bfb3 commit 69119d8

2 files changed

Lines changed: 54 additions & 27 deletions

File tree

css-ruby/Overview.html

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
136136
<ul class=toc>
137137
<li><a href=#segment-pairing><span class=secno>2.3.1</span> Segment Pairing</a>
138138
<li><a href=#base-annotation-pairing><span class=secno>2.3.2</span> Unit Pairing</a>
139-
<li><a href=#nested-pairing><span class=secno>2.3.3</span> Nested Ruby</a></ul>
139+
<li><a href=#nested-pairing><span class=secno>2.3.3</span> Complex Spanning and Nested Ruby</a></ul>
140140
<li><a href=#autohide><span class=secno>2.4</span> Autohiding Annotations</a>
141141
<li><a href=#white-space><span class=secno>2.5</span> White Space</a>
142142
<li><a href=#ruby-layout><span class=secno>2.6</span> Ruby layout</a>
@@ -459,11 +459,16 @@ <h3 class="heading settled heading" data-level=2.2 id=box-fixup><span class=secn
459459
Alternatively we could try to define some kind of acceptable behavior for them.
460460
</ol>
461461

462+
<p>For the purpose of the rules above,
463+
a <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a> directly parented by a <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
464+
is considered to be a <a data-link-type=dfn href=#ruby-base-container-box title="ruby base container">ruby base container</a>.
465+
See <a data-link-type=dfn href=#nested-ruby title="nested ruby">nested ruby</a>, below.
466+
462467
<p class=issue id=issue-f2086090><a class=self-link href=#issue-f2086090></a>Make this into an example:
463468
<img src=http://lists.w3.org/Archives/Public/www-archive/2014Jun/att-0027/PastedGraphic-1.png style="display: block; width: 100%">
464469

465-
<p>At this point, all ruby layout structures are properly parented,
466-
and the UA can start to associate bases with their annotations.
470+
<p>Once all ruby layout structures are properly parented,
471+
the UA can start to associate bases with their annotations.
467472

468473
<p class=note>
469474
Note that the UA is not required to create any of these anonymous boxes
@@ -571,21 +576,28 @@ <h4 class="heading settled heading" data-level=2.3.2 id=base-annotation-pairing>
571576
<p class=issue id=issue-0230a91a><a class=self-link href=#issue-0230a91a></a>Insert diagram</p>
572577

573578
<h4 class="heading settled heading" data-level=2.3.3 id=nested-pairing><span class=secno>2.3.3 </span><span class=content>
574-
Nested Ruby</span><a class=self-link href=#nested-pairing></a></h4>
579+
Complex Spanning and Nested Ruby</span><a class=self-link href=#nested-pairing></a></h4>
575580

576-
<p>When <a data-link-type=dfn href=#ruby-container title="ruby containers">ruby containers</a> are nested,
581+
<p><dfn data-dfn-type=dfn data-noexport="" id=nested-ruby title="nested ruby"><a class=self-link href=#nested-ruby></a></dfn>When <a data-link-type=dfn href=#ruby-container title="ruby containers">ruby containers</a> are nested,
577582
pairing begins with the deepest <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>,
578-
then expands out,
579-
treating each <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a> nested within another <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
580-
essentially as a single <a data-link-type=dfn href=#ruby-base-box title="ruby base">ruby base</a> in the outer <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>,
581-
and associating each <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotation">ruby annotation</a>
582-
paired with the nested <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
583-
as being associated with (spanning) all of its <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a>.
584-
585-
<p>Using nested <a data-link-type=dfn href=#ruby-container title="ruby containers">ruby containers</a> thus allows the representation
583+
then expands out.
584+
From the pairing perspective of the outer <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>,
585+
each <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a> nested within another <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
586+
counts as representing a single <a data-link-type=dfn href=#ruby-base-box title="ruby base">ruby base</a>/<a data-link-type=dfn href=#ruby-annotation-box title=annotation>annotation</a> per level.
587+
The outer <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>’s <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a> paired to the <a data-link-type=dfn href=#nested-ruby title="nested ruby">nested ruby</a>
588+
are therefore paired with (and <a data-link-type=dfn href=#span title=span>span</a>) all of the nested <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>’s <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a>.
589+
Each <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation container">ruby annotation container</a> in the nested <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
590+
occupies the same <a data-link-type=dfn href=#annotation-level title="annotation level">annotation level</a> in the outer <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
591+
as it does in the inner one
592+
and participates in its layout as if it were directly contained in the outer <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>.
593+
594+
<p>This process is recursive.
595+
Thus, using nested <a data-link-type=dfn href=#ruby-container title="ruby containers">ruby containers</a> allows the representation
586596
of complex spanning relationships.
587597

588-
<p class=issue id=issue-2f9c28f2><a class=self-link href=#issue-2f9c28f2></a>This has to be Level 1 because HTML5 allows it, so we have to handle it. Yay HTML5.
598+
<p class=issue id=issue-05f90a82><a class=self-link href=#issue-05f90a82></a>This has to be Level 1 because HTML5 allows it, so we have to handle it. Yay HTML5.
599+
(Also, if we’re ever going to support it, it has to be designed into level 1
600+
or authors will depend on whatever degenerate behavior falls out.)
589601

590602
<h3 class="heading settled heading" data-level=2.4 id=autohide><span class=secno>2.4 </span><span class=content>
591603
Autohiding Annotations</span><a class=self-link href=#autohide></a></h3>
@@ -1564,6 +1576,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
15641576
<li>intra-ruby white space, <a href=#intra-ruby-white-space title="section 2.2">2.2</a>
15651577
<li>left, <a href=#valdef-ruby-position.left title="section 3.1">3.1</a>
15661578
<li>level, <a href=#annotation-level title="section 2.3.1">2.3.1</a>
1579+
<li>nested ruby, <a href=#nested-ruby title="section 2.3.3">2.3.3</a>
15671580
<li>over, <a href=#valdef-ruby-position.over title="section 3.1">3.1</a>
15681581
<li>pairing, <a href=#pairing title="section 2.3">2.3</a>
15691582
<li>right, <a href=#valdef-ruby-position.right title="section 3.1">3.1</a>
@@ -1611,8 +1624,10 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
16111624
<a href=#issue-f2086090></a></div><div class=issue>Insert diagram<a href=#issue-0230a91a></a></div>
16121625

16131626
<div class=issue>This has to be Level 1 because HTML5 allows it, so we have to handle it. Yay HTML5.
1627+
(Also, if we’re ever going to support it, it has to be designed into level 1
1628+
or authors will depend on whatever degenerate behavior falls out.)
16141629

1615-
<a href=#issue-2f9c28f2></a></div><div class=issue>Specify how these anonymous white space boxes impact layout.
1630+
<a href=#issue-05f90a82></a></div><div class=issue>Specify how these anonymous white space boxes impact layout.
16161631

16171632
<a href=#issue-1851041e></a></div><div class=issue>Or should it become a quasi-base between two bases?<a href=#issue-029133da></a></div>
16181633
A spanning <div class=issue>

css-ruby/Overview.src.html

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,16 @@ <h3 id="box-fixup">
302302
Alternatively we could try to define some kind of acceptable behavior for them.
303303
</ol>
304304

305+
<p>For the purpose of the rules above,
306+
a <i>ruby container</i> directly parented by a <i>ruby container</i>
307+
is considered to be a <i>ruby base container</i>.
308+
See <i>nested ruby</i>, below.
309+
305310
<p class="issue">Make this into an example:
306311
<img src="http://lists.w3.org/Archives/Public/www-archive/2014Jun/att-0027/PastedGraphic-1.png" style="display: block; width: 100%">
307312

308-
<p>At this point, all ruby layout structures are properly parented,
309-
and the UA can start to associate bases with their annotations.
313+
<p>Once all ruby layout structures are properly parented,
314+
the UA can start to associate bases with their annotations.
310315

311316
<p class="note">
312317
Note that the UA is not required to create any of these anonymous boxes
@@ -414,21 +419,28 @@ <h4 id="base-annotation-pairing">
414419
<p class="issue">Insert diagram</p>
415420

416421
<h4 id="nested-pairing">
417-
Nested Ruby</h4>
422+
Complex Spanning and Nested Ruby</h4>
418423

419-
<p>When <i>ruby containers</i> are nested,
424+
<p><dfn title="nested ruby"></dfn>When <i>ruby containers</i> are nested,
420425
pairing begins with the deepest <i>ruby container</i>,
421-
then expands out,
422-
treating each <i>ruby container</i> nested within another <i>ruby container</i>
423-
essentially as a single <i>ruby base</i> in the outer <i>ruby container</i>,
424-
and associating each <i>ruby annotation</i>
425-
paired with the nested <i>ruby container</i>
426-
as being associated with (spanning) all of its <i>ruby bases</i>.
427-
428-
<p>Using nested <i>ruby containers</i> thus allows the representation
426+
then expands out.
427+
From the pairing perspective of the outer <i>ruby container</i>,
428+
each <i>ruby container</i> nested within another <i>ruby container</i>
429+
counts as representing a single <i>ruby base</i>/<i>annotation</i> per level.
430+
The outer <i>ruby container</i>’s <i>ruby annotations</i> paired to the <i>nested ruby</i>
431+
are therefore paired with (and <i>span</i>) all of the nested <i>ruby container</i>’s <i>ruby bases</i>.
432+
Each <i>ruby annotation container</i> in the nested <i>ruby container</i>
433+
occupies the same <i>annotation level</i> in the outer <i>ruby container</i>
434+
as it does in the inner one
435+
and participates in its layout as if it were directly contained in the outer <i>ruby container</i>.
436+
437+
<p>This process is recursive.
438+
Thus, using nested <i>ruby containers</i> allows the representation
429439
of complex spanning relationships.
430440

431441
<p class="issue">This has to be Level 1 because HTML5 allows it, so we have to handle it. Yay HTML5.
442+
(Also, if we're ever going to support it, it has to be designed into level 1
443+
or authors will depend on whatever degenerate behavior falls out.)
432444

433445
<h3 id="autohide">
434446
Autohiding Annotations</h3>

0 commit comments

Comments
 (0)