Skip to content

Commit 16f8c1f

Browse files
committed
[css-ruby] Fix rules to handle anonymous ruby containers.
--HG-- extra : rebase_source : 576a8522d418a4397e6ad7a2b35e08d827b1032a
1 parent 27c8c07 commit 16f8c1f

File tree

2 files changed

+56
-29
lines changed

2 files changed

+56
-29
lines changed

css-ruby/Overview.html

+32-18
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</p>
5555
<h1 class="p-name no-ref" id=title>CSS Ruby Layout Module Level 1</h1>
5656
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
57-
<span class=dt-updated><span class=value-title title=20140702>2 July 2014</span></span></span></h2>
57+
<span class=dt-updated><span class=value-title title=20140707>7 July 2014</span></span></span></h2>
5858
<div data-fill-with=spec-metadata><dl>
5959
<dt>This version:
6060
<dd><a class=u-url href=http://dev.w3.org/csswg/css-ruby-1/>http://dev.w3.org/csswg/css-ruby-1/</a>
@@ -128,9 +128,9 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
128128
<li><a href=#ruby-def><span class=secno>1.4</span> What is ruby?</a></ul>
129129
<li><a href=#ruby-model><span class=secno>2</span> Ruby Box Model</a>
130130
<ul class=toc>
131-
<li><a href=#ruby-display><span class=secno>2.1</span> Ruby-specific <span>display</span> Values</a>
131+
<li><a href=#ruby-display><span class=secno>2.1</span> Ruby-specific <span class=property data-link-type=propdesc title=display>display</span> Values</a>
132132
<ul class=toc>
133-
<li><a href=#display-inside-outside><span class=secno>2.1.1</span> Ruby-specific <span>display-inside</span> and <span>display-outside</span> values</a></ul>
133+
<li><a href=#display-inside-outside><span class=secno>2.1.1</span> Ruby-specific <span class=property data-link-type=propdesc title=display-inside>display-inside</span> and <span class=property data-link-type=propdesc title=display-outside>display-outside</span> values</a></ul>
134134
<li><a href=#box-fixup><span class=secno>2.2</span> Anonymous Ruby Box Generation</a>
135135
<li><a href=#ruby-pairing><span class=secno>2.3</span> Annotation Pairing</a>
136136
<ul class=toc>
@@ -151,9 +151,9 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
151151
<li><a href=#line-height><span class=secno>3.5</span> Line Spacing</a></ul>
152152
<li><a href=#ruby-props><span class=secno>4</span> Ruby Formatting Properties</a>
153153
<ul class=toc>
154-
<li><a href=#rubypos><span class=secno>4.1</span> Ruby Positioning: the <span>ruby-position</span> property</a>
155-
<li><a href=#collapsed-ruby><span class=secno>4.2</span> Sharing Annotation Space: the <span>ruby-merge</span> property</a>
156-
<li><a href=#ruby-align-property><span class=secno>4.3</span> <span></span> Ruby Text Distribution: the <span>ruby-align</span> property</a></ul>
154+
<li><a href=#rubypos><span class=secno>4.1</span> Ruby Positioning: the <span class=property data-link-type=propdesc title=ruby-position>ruby-position</span> property</a>
155+
<li><a href=#collapsed-ruby><span class=secno>4.2</span> Sharing Annotation Space: the <span class=property data-link-type=propdesc title=ruby-merge>ruby-merge</span> property</a>
156+
<li><a href=#ruby-align-property><span class=secno>4.3</span> <span></span> Ruby Text Distribution: the <span class=property data-link-type=propdesc title=ruby-align>ruby-align</span> property</a></ul>
157157
<li><a href=#edge-effects><span class=secno>5</span> Edge Effects</a>
158158
<ul class=toc>
159159
<li><a href=#ruby-overhang><span class=secno>5.1</span> Overhanging Ruby</a>
@@ -430,6 +430,24 @@ <h3 class="heading settled heading" data-level=2.2 id=box-fixup><span class=secn
430430
<a href=http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes>similar to those used to normalize tables</a>. <a data-biblio-type=normative data-link-type=biblio href=#biblio-css21 title=biblio-css21>[CSS21]</a>
431431

432432
<ol>
433+
<li id=anon-gen-anon-ruby><a class=self-link href=#anon-gen-anon-ruby></a><strong>Generate anonymous ruby containers</strong>:
434+
Any <a href=http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes>consecutive</a> sequence of
435+
improperly-contained
436+
<a data-link-type=dfn href=#ruby-base-container-box title="ruby base containers">ruby base containers</a>,
437+
<a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation containers">ruby annotation containers</a>,
438+
<a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a>,
439+
and/or
440+
<a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a>
441+
(and any intervening <i data-link-type=dfn title="white space">white space</i>)
442+
is wrapped in an anonymous <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>.
443+
For the purpose of this step:
444+
<ul>
445+
<li>an improperly-contained <a data-link-type=dfn href=#ruby-base-box title="ruby base">ruby base</a> is one not parented by a <a data-link-type=dfn href=#ruby-base-container-box title="ruby base container">ruby base container</a> or <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
446+
<li>an improperly-contained <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotation">ruby annotation</a> is one not parented by a <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation container">ruby annotation container</a> or <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
447+
<li>an improperly-contained <a data-link-type=dfn href=#ruby-base-container-box title="ruby base container">ruby base container</a> or <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation container">ruby annotation container</a>
448+
is one not parented by a <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
449+
</ul>
450+
433451
<li id=anon-gen-inlinize><a class=self-link href=#anon-gen-inlinize></a><strong>Inlinize block-level boxes:</strong>
434452
Any in-flow block-level boxes directly contained by a
435453
<a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>,
@@ -519,6 +537,12 @@ <h3 class="heading settled heading" data-level=2.2 id=box-fixup><span class=secn
519537
The <dfn data-dfn-type=dfn data-noexport="" id=intra-level-white-space>intra-level white space<a class=self-link href=#intra-level-white-space></a></dfn> boxes defined above are
520538
treated specially for pairing and layout. See below.
521539

540+
<li id=anon-gen-unbreak><a class=self-link href=#anon-gen-unbreak></a><strong>Suppress line breaks:</strong>
541+
Convert all forced line breaks inside <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a> (regardless of <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-text-3/#propdef-white-space title=white-space>white-space</a> value)
542+
as defined for <i data-link-type=dfn title=collapsible>collapsible</i> segment breaks in <a href=http://www.w3.org/TR/css-text-3/#line-break-transform>CSS Text Level 3 § 4.1.2</a>.
543+
<p class=issue id=issue-8af70305><a class=self-link href=#issue-8af70305></a>The goal of this is to simplify the layout model by suppressing any line breaks within ruby annotations.
544+
Alternatively we could try to define some kind of acceptable behavior for them.
545+
522546
<li id=anon-gen-anon-containers><a class=self-link href=#anon-gen-anon-containers></a><strong>Generate anonymous level containers:</strong>
523547
Any consecutive sequence of <a data-link-type=dfn href=#ruby-base-box title="ruby bases">ruby bases</a> and <a data-link-type=dfn href=#inter-base-white-space title="inter-base white space">inter-base white space</a>
524548
(and not <a data-link-type=dfn href=#inter-segment-white-space title="inter-segment white space">inter-segment white space</a>)
@@ -527,17 +551,6 @@ <h3 class="heading settled heading" data-level=2.2 id=box-fixup><span class=secn
527551
Similarly, any consecutive sequence of <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a> and <a data-link-type=dfn href=#inter-annotation-white-space title="inter-annotation white space">inter-annotation white space</a>
528552
not parented by a <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation container">ruby annotation container</a>
529553
is wrapped in an anonymous <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation container">ruby annotation container</a>.
530-
531-
<li id=anon-gen-anon-ruby><a class=self-link href=#anon-gen-anon-ruby></a><strong>Generate anonymous ruby containers</strong>:
532-
A sequence of <a data-link-type=dfn href=#ruby-base-container-box title="ruby base containers">ruby base containers</a>, <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation containers">ruby annotation containers</a>, and/or <a data-link-type=dfn href=#inter-segment-white-space title="inter-segment white space">inter-segment white space</a>
533-
not parented by a <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>
534-
is wrapped in an anonymous <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>.
535-
536-
<li id=anon-gen-unbreak><a class=self-link href=#anon-gen-unbreak></a><strong>Suppress line breaks:</strong>
537-
Convert all forced line breaks inside <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a> (regardless of <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-text-3/#propdef-white-space title=white-space>white-space</a> value)
538-
as defined for <i data-link-type=dfn title=collapsible>collapsible</i> segment breaks in <a href=http://www.w3.org/TR/css-text-3/#line-break-transform>CSS Text Level 3 § 4.1.2</a>.
539-
<p class=issue id=issue-8af70305><a class=self-link href=#issue-8af70305></a>The goal of this is to simplify the layout model by suppressing any line breaks within ruby annotations.
540-
Alternatively we could try to define some kind of acceptable behavior for them.
541554
</ol>
542555

543556
<p>For the purpose of the rules above,
@@ -1712,7 +1725,8 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
17121725

17131726
<div class=issue>The goal of this is to simplify the layout model by suppressing any line breaks within ruby annotations.
17141727
Alternatively we could try to define some kind of acceptable behavior for them.
1715-
<a href=#issue-8af70305></a></div><div class=issue>Make this into an example:
1728+
1729+
<a href=#issue-8af70305></a></div><div class=issue>Make this into an example:
17161730
<img src=http://lists.w3.org/Archives/Public/www-archive/2014Jun/att-0027/PastedGraphic-1.png style="display: block; width: 100%">
17171731

17181732
<a href=#issue-f2086090></a></div><div class=issue>Insert diagram<a href=#issue-0230a91a></a></div>

css-ruby/Overview.src.html

+24-11
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,24 @@ <h3 id="box-fixup">
276276
<a href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes">similar to those used to normalize tables</a>. [[!CSS21]]
277277

278278
<ol>
279+
<li id="anon-gen-anon-ruby"><strong>Generate anonymous ruby containers</strong>:
280+
Any <a href="http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes">consecutive</a> sequence of
281+
improperly-contained
282+
<i>ruby base containers</i>,
283+
<i>ruby annotation containers</i>,
284+
<i>ruby bases</i>,
285+
and/or
286+
<i>ruby annotations</i>
287+
(and any intervening <i>white space</i>)
288+
is wrapped in an anonymous <i>ruby container</i>.
289+
For the purpose of this step:
290+
<ul>
291+
<li>an improperly-contained <i>ruby base</i> is one not parented by a <i>ruby base container</i> or <i>ruby container</i>
292+
<li>an improperly-contained <i>ruby annotation</i> is one not parented by a <i>ruby annotation container</i> or <i>ruby container</i>
293+
<li>an improperly-contained <i>ruby base container</i> or <i>ruby annotation container</i>
294+
is one not parented by a <i>ruby container</i>
295+
</ul>
296+
279297
<li id="anon-gen-inlinize"><strong>Inlinize block-level boxes:</strong>
280298
Any in-flow block-level boxes directly contained by a
281299
<i>ruby container</i>,
@@ -365,6 +383,12 @@ <h3 id="box-fixup">
365383
The <dfn>intra-level white space</dfn> boxes defined above are
366384
treated specially for pairing and layout. See below.
367385

386+
<li id="anon-gen-unbreak"><strong>Suppress line breaks:</strong>
387+
Convert all forced line breaks inside <i>ruby annotations</i> (regardless of 'white-space' value)
388+
as defined for <i>collapsible</i> segment breaks in <a href="http://www.w3.org/TR/css-text-3/#line-break-transform">CSS Text Level 3 &sect; 4.1.2</a>.
389+
<p class="issue">The goal of this is to simplify the layout model by suppressing any line breaks within ruby annotations.
390+
Alternatively we could try to define some kind of acceptable behavior for them.
391+
368392
<li id="anon-gen-anon-containers"><strong>Generate anonymous level containers:</strong>
369393
Any consecutive sequence of <i>ruby bases</i> and <i>inter-base white space</i>
370394
(and not <i>inter-segment white space</i>)
@@ -373,17 +397,6 @@ <h3 id="box-fixup">
373397
Similarly, any consecutive sequence of <i>ruby annotations</i> and <i>inter-annotation white space</i>
374398
not parented by a <i>ruby annotation container</i>
375399
is wrapped in an anonymous <i>ruby annotation container</i>.
376-
377-
<li id="anon-gen-anon-ruby"><strong>Generate anonymous ruby containers</strong>:
378-
A sequence of <i>ruby base containers</i>, <i>ruby annotation containers</i>, and/or <i>inter-segment white space</i>
379-
not parented by a <i>ruby container</i>
380-
is wrapped in an anonymous <i>ruby container</i>.
381-
382-
<li id="anon-gen-unbreak"><strong>Suppress line breaks:</strong>
383-
Convert all forced line breaks inside <i>ruby annotations</i> (regardless of 'white-space' value)
384-
as defined for <i>collapsible</i> segment breaks in <a href="http://www.w3.org/TR/css-text-3/#line-break-transform">CSS Text Level 3 &sect; 4.1.2</a>.
385-
<p class="issue">The goal of this is to simplify the layout model by suppressing any line breaks within ruby annotations.
386-
Alternatively we could try to define some kind of acceptable behavior for them.
387400
</ol>
388401

389402
<p>For the purpose of the rules above,

0 commit comments

Comments
 (0)