Skip to content

Commit b97362b

Browse files
committed
[css-ruby] Remove a couple of dumb issues and expand a bit the formatting context section
1 parent b18734d commit b97362b

2 files changed

Lines changed: 61 additions & 100 deletions

File tree

css-ruby/Overview.html

Lines changed: 36 additions & 68 deletions
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=20140724>24 July 2014</span></span></span></h2>
57+
<span class=dt-updated><span class=value-title title=20140730>30 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>
@@ -130,8 +130,9 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
130130
<ul class=toc>
131131
<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 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>
134-
<li><a href=#block-ruby><span class=secno>2.1.2</span> Non-Inline Ruby</a></ul>
133+
<li><a href=#formatting-context><span class=secno>2.1.1</span> The Ruby Formatting Context</a>
134+
<li><a href=#display-inside-outside><span class=secno>2.1.2</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>
135+
<li><a href=#block-ruby><span class=secno>2.1.3</span> Non-Inline Ruby</a></ul>
135136
<li><a href=#box-fixup><span class=secno>2.2</span> Anonymous Ruby Box Generation</a>
136137
<li><a href=#ruby-pairing><span class=secno>2.3</span> Annotation Pairing</a>
137138
<ul class=toc>
@@ -193,26 +194,6 @@ <h2 class="heading settled heading" data-level=1 id=intro><span class=secno>1 </
193194

194195
<p><em>This section is not normative.</em>
195196

196-
<div class=issue id=issue-8c07d92e><a class=self-link href=#issue-8c07d92e></a>
197-
<p>Depending on how implementers feel about it,
198-
we might want to limit (via the at-risk list) CSS Ruby Layout Level 1, like HTML5,
199-
to two levels of annotation.
200-
Subsequent levels would be inlined immediately after their ruby segment.
201-
(Not sure how to represent that limitation in <code>@supports</code>, though.)
202-
203-
<p>FWIW, the main complexity item of concern with &gt;2 levels is nested ruby.
204-
The next most complex feature, after nested ruby,
205-
is allowing two levels of ruby on the same side of the text.
206-
Removing either of these features, however, boxes us into a corner.
207-
By removing nested ruby handling,
208-
we’d create a dependency on nested ruby not being handled optimally
209-
(unless we did something dumb and always obviously broken somehow).
210-
By forcing a second annotation to be on the opposite side of the first,
211-
we create an assumption that it can never be placed on the same side,
212-
and that <a class=property data-link-type=propdesc href=#propdef-ruby-position title=ruby-position>ruby-position</a> rules that would place the second annotation
213-
on the same side as the first have no effect.
214-
</div>
215-
216197
<h3 class="heading settled heading" data-level=1.1 id=placement><span class=secno>1.1 </span><span class=content>
217198
Module interactions</span><a class=self-link href=#placement></a></h3>
218199

@@ -366,22 +347,36 @@ <h3 class="heading settled heading" data-level=2.1 id=ruby-display><span class=s
366347
(Corresponds to HTML/XHTML <code>&lt;rtc&gt;</code> elements.)
367348
</dl>
368349

369-
<p><a data-link-type=dfn href=#ruby-container title="ruby containers">Ruby containers</a> are non-atomic inline-level boxes:
370-
like inline boxes, they break across lines and
371-
their base-level contents participate in the same inline formatting context as the <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a> itself.
350+
<p class=advisement>Authors using a language (such as HTML)
351+
that supports dedicated ruby markup
352+
should use that markup rather than
353+
styling arbitrary elements (like <code>&lt;span&gt;</code>)
354+
with ruby <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> values.
355+
Using the correct markup ensures that screen readers
356+
and non-CSS renderers can interpret the ruby structures.
357+
358+
<h4 class="heading settled heading" data-level=2.1.1 id=formatting-context><span class=secno>2.1.1 </span><span class=content>
359+
The Ruby Formatting Context</span><a class=self-link href=#formatting-context></a></h4>
360+
361+
<p><a data-link-type=dfn href=#ruby-container title="ruby containers">Ruby containers</a> are non-atomic inline-level boxes.
362+
Like inline boxes, they break across lines,
363+
and their containing block is the nearest block container ancestor.
364+
And just as the contents of an inline box
365+
participate in the same inline formatting context that contains the inline box itself,
366+
a <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a> and its base-level contents
367+
participate in the same inline formatting context that contains the <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a> itself,
368+
369+
<p>However <a data-link-type=dfn href=#ruby-container title="ruby containers">ruby containers</a> also establish a <dfn data-dfn-type=dfn data-noexport="" id=ruby-formatting-context>ruby formatting context<a class=self-link href=#ruby-formatting-context></a></dfn>
370+
that builds further structure around their segment of the inline formatting context.
372371
<a data-link-type=dfn href=#ruby-base-box title="ruby bases">Ruby bases</a>, <a data-link-type=dfn href=#ruby-annotation-box title="ruby annotations">ruby annotations</a>, <a data-link-type=dfn href=#ruby-base-container-box title="ruby base containers">ruby base containers</a>, and <a data-link-type=dfn href=#ruby-annotation-container-box title="ruby annotation containers">ruby annotation containers</a>
373372
are <dfn data-dfn-type=dfn data-noexport="" id=internal-ruby-boxes title="internal ruby boxes|internal ruby display types">internal ruby boxes<a class=self-link href=#internal-ruby-boxes></a></dfn>:
374373
like <i data-link-type=dfn title="internal table elements">internal table elements</i>,
375-
they have specific roles in ruby layout.
376-
<span class=issue id=issue-ca88244c><a class=self-link href=#issue-ca88244c></a>Are internal ruby boxes inline-level?</span>
374+
they have specific roles in ruby layout,
375+
and participate in their <a data-link-type=dfn href=#ruby-container title="ruby container">ruby container</a>’s <a data-link-type=dfn href=#ruby-formatting-context title="ruby formatting context">ruby formatting context</a>.
377376

378-
<p>Authors using a language (such as HTML) that supports ruby markup
379-
should use that markup rather than styling arbitrary elements (like <code>&lt;span&gt;</code>)
380-
with ruby <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> values.
381-
Using the correct markup ensures that screen readers
382-
and non-CSS renderers can interpret the ruby structures.
377+
<p class=issue id=issue-ca88244c><a class=self-link href=#issue-ca88244c></a>Are internal ruby boxes inline-level?
383378

384-
<h4 class="heading settled heading" data-level=2.1.1 id=display-inside-outside><span class=secno>2.1.1 </span><span class=content>
379+
<h4 class="heading settled heading" data-level=2.1.2 id=display-inside-outside><span class=secno>2.1.2 </span><span class=content>
385380
Ruby-specific <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-inside title=display-inside>display-inside</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-outside title=display-outside>display-outside</a> values</span><a class=self-link href=#display-inside-outside></a></h4>
386381

387382
<p>The ruby-specific <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> values map to <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-inside title=display-inside>display-inside</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-outside title=display-outside>display-outside</a> as follows:
@@ -411,7 +406,7 @@ <h4 class="heading settled heading" data-level=2.1.1 id=display-inside-outside><
411406
<p>See the <a href=http://www.w3.org/TR/css-display/>CSS Display Module</a>
412407
for more information on <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-inside title=display-inside>display-inside</a> and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-outside title=display-outside>display-outside</a>. <a data-biblio-type=normative data-link-type=biblio href=#biblio-css3-display title=biblio-css3-display>[CSS3-DISPLAY]</a>
413408

414-
<h4 class="heading settled heading" data-level=2.1.2 id=block-ruby><span class=secno>2.1.2 </span><span class=content>
409+
<h4 class="heading settled heading" data-level=2.1.3 id=block-ruby><span class=secno>2.1.3 </span><span class=content>
415410
Non-Inline Ruby</span><a class=self-link href=#block-ruby></a></h4>
416411

417412
<p>If an element has a computed <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-display-3/#propdef-display-inside title=display-inside>display-inside</a> of <a class=css data-link-type=maybe href=#ruby title=ruby>ruby</a>
@@ -424,10 +419,9 @@ <h4 class="heading settled heading" data-level=2.1.2 id=block-ruby><span class=s
424419
This allows styling the element as a block,
425420
while correctly maintaining the internal ruby structure.
426421

427-
<p class=issue id=issue-b4dd0f5f><a class=self-link href=#issue-b4dd0f5f></a>
422+
<p>
428423
Note: There is no dedicated block-level <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> shorthand keyword
429424
because ruby is fundamentally an inline layout feature.
430-
<span class=issue id=issue-feac3754><a class=self-link href=#issue-feac3754></a>We might need one to handle <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> blockification, though. :(</span>
431425

432426
<p>Absolute positioning or floating an element causes its <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> value
433427
to compute to a block-level equivalent. (See <a data-biblio-type=normative data-link-type=biblio href=#biblio-css21 title=biblio-css21>[CSS21]</a> section 9.7.)
@@ -1701,8 +1695,8 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
17011695
<li>inter-base white space, <a href=#inter-base-white-space title="section 2.2">2.2</a>
17021696
<li>inter-character, <a href=#valdef-ruby-position.inter-character title="section 4.1">4.1</a>
17031697
<li>inter-level white space, <a href=#inter-level-white-space title="section 2.2">2.2</a>
1704-
<li>internal ruby boxes, <a href=#internal-ruby-boxes title="section 2.1">2.1</a>
1705-
<li>internal ruby display types, <a href=#internal-ruby-boxes title="section 2.1">2.1</a>
1698+
<li>internal ruby boxes, <a href=#internal-ruby-boxes title="section 2.1.1">2.1.1</a>
1699+
<li>internal ruby display types, <a href=#internal-ruby-boxes title="section 2.1.1">2.1.1</a>
17061700
<li>inter-segment white space, <a href=#inter-segment-white-space title="section 2.2">2.2</a>
17071701
<li>intra-level white space, <a href=#intra-level-white-space title="section 2.2">2.2</a>
17081702
<li>intra-ruby white space, <a href=#intra-ruby-white-space title="section 2.2">2.2</a>
@@ -1728,6 +1722,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
17281722
<li>ruby base container box, <a href=#ruby-base-container-box title="section 2.1">2.1</a>
17291723
<li>ruby container, <a href=#ruby-container title="section 2.1">2.1</a>
17301724
<li>ruby container box, <a href=#ruby-container title="section 2.1">2.1</a>
1725+
<li>ruby formatting context, <a href=#ruby-formatting-context title="section 2.1.1">2.1.1</a>
17311726
<li>ruby-merge, <a href=#propdef-ruby-merge title="section 4.2">4.2</a>
17321727
<li>ruby-merge:auto, <a href=#valdef-ruby-merge.ruby-mergeauto title="section 4.2">4.2</a>
17331728
<li>ruby-merge:collapse, <a href=#valdef-ruby-merge.ruby-mergecollapse title="section 4.2">4.2</a>
@@ -1748,36 +1743,9 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
17481743
<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-ruby-align title=ruby-align>ruby-align</a><td>start | center | space-between | space-around<td>space-around<td>ruby bases, ruby annotations, ruby base containers, ruby annotation containers<td>yes<td>N/A<td>visual<td><td><td>specified value (except for initial and inherit)<td></table></div>
17491744

17501745

1751-
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>
1752-
<p>Depending on how implementers feel about it,
1753-
we might want to limit (via the at-risk list) CSS Ruby Layout Level 1, like HTML5,
1754-
to two levels of annotation.
1755-
Subsequent levels would be inlined immediately after their ruby segment.
1756-
(Not sure how to represent that limitation in <code>@supports</code>, though.)
1757-
1758-
<p>FWIW, the main complexity item of concern with &gt;2 levels is nested ruby.
1759-
The next most complex feature, after nested ruby,
1760-
is allowing two levels of ruby on the same side of the text.
1761-
Removing either of these features, however, boxes us into a corner.
1762-
By removing nested ruby handling,
1763-
we’d create a dependency on nested ruby not being handled optimally
1764-
(unless we did something dumb and always obviously broken somehow).
1765-
By forcing a second annotation to be on the opposite side of the first,
1766-
we create an assumption that it can never be placed on the same side,
1767-
and that <a class=property data-link-type=propdesc href=#propdef-ruby-position title=ruby-position>ruby-position</a> rules that would place the second annotation
1768-
on the same side as the first have no effect.
1769-
</p><a href=#issue-8c07d92e></a></div>
1770-
1771-
<div class=issue>Are internal ruby boxes inline-level?<a href=#issue-ca88244c></a></div>
1772-
1773-
<div class=issue>
1774-
Note: There is no dedicated block-level <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> shorthand keyword
1775-
because ruby is fundamentally an inline layout feature.
1776-
<span class=issue>We might need one to handle <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> blockification, though. :(</span>
1777-
1778-
<a href=#issue-b4dd0f5f></a></div><div class=issue>We might need one to handle <a class=property data-link-type=propdesc href=#propdef-display title=display>display</a> blockification, though. :(<a href=#issue-feac3754></a></div>
1746+
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>Are internal ruby boxes inline-level?
17791747

1780-
<div class=issue>This should go into the Display module.<a href=#issue-de71092e></a></div>
1748+
<a href=#issue-ca88244c></a></div><div class=issue>This should go into the Display module.<a href=#issue-de71092e></a></div>
17811749
For the <div class=issue>Once that’s done, this can become a note.<a href=#issue-93d00b01></a></div>
17821750

17831751
<div class=issue>The goal of this is to simplify the layout model by suppressing any line breaks within ruby annotations.

css-ruby/Overview.src.html

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,6 @@ <h2 id="intro">
3131

3232
<p><em>This section is not normative.</em>
3333

34-
<div class="issue">
35-
<p>Depending on how implementers feel about it,
36-
we might want to limit (via the at-risk list) CSS Ruby Layout Level 1, like HTML5,
37-
to two levels of annotation.
38-
Subsequent levels would be inlined immediately after their ruby segment.
39-
(Not sure how to represent that limitation in <code>@supports</code>, though.)
40-
41-
<p>FWIW, the main complexity item of concern with >2 levels is nested ruby.
42-
The next most complex feature, after nested ruby,
43-
is allowing two levels of ruby on the same side of the text.
44-
Removing either of these features, however, boxes us into a corner.
45-
By removing nested ruby handling,
46-
we'd create a dependency on nested ruby not being handled optimally
47-
(unless we did something dumb and always obviously broken somehow).
48-
By forcing a second annotation to be on the opposite side of the first,
49-
we create an assumption that it can never be placed on the same side,
50-
and that 'ruby-position' rules that would place the second annotation
51-
on the same side as the first have no effect.
52-
</div>
53-
5434
<h3 id="placement">
5535
Module interactions</h3>
5636

@@ -207,20 +187,34 @@ <h3 id="ruby-display">
207187
(Corresponds to HTML/XHTML <code>&lt;rtc&gt;</code> elements.)
208188
</dl>
209189

210-
<p><i>Ruby containers</i> are non-atomic inline-level boxes:
211-
like inline boxes, they break across lines and
212-
their base-level contents participate in the same inline formatting context as the <i>ruby container</i> itself.
190+
<p class="advisement">Authors using a language (such as HTML)
191+
that supports dedicated ruby markup
192+
should use that markup rather than
193+
styling arbitrary elements (like <code>&lt;span&gt;</code>)
194+
with ruby 'display' values.
195+
Using the correct markup ensures that screen readers
196+
and non-CSS renderers can interpret the ruby structures.
197+
198+
<h4 id="formatting-context">
199+
The Ruby Formatting Context</h4>
200+
201+
<p><i>Ruby containers</i> are non-atomic inline-level boxes.
202+
Like inline boxes, they break across lines,
203+
and their containing block is the nearest block container ancestor.
204+
And just as the contents of an inline box
205+
participate in the same inline formatting context that contains the inline box itself,
206+
a <i>ruby container</i> and its base-level contents
207+
participate in the same inline formatting context that contains the <i>ruby container</i> itself,
208+
209+
<p>However <i>ruby containers</i> also establish a <dfn>ruby formatting context</dfn>
210+
that builds further structure around their segment of the inline formatting context.
213211
<i>Ruby bases</i>, <i>ruby annotations</i>, <i>ruby base containers</i>, and <i>ruby annotation containers</i>
214212
are <dfn title="internal ruby boxes|internal ruby display types">internal ruby boxes</dfn>:
215213
like <i>internal table elements</i>,
216-
they have specific roles in ruby layout.
217-
<span class="issue">Are internal ruby boxes inline-level?</span>
214+
they have specific roles in ruby layout,
215+
and participate in their <i>ruby container</i>’s <i>ruby formatting context</i>.
218216

219-
<p>Authors using a language (such as HTML) that supports ruby markup
220-
should use that markup rather than styling arbitrary elements (like <code>&lt;span&gt;</code>)
221-
with ruby 'display' values.
222-
Using the correct markup ensures that screen readers
223-
and non-CSS renderers can interpret the ruby structures.
217+
<p class="issue">Are internal ruby boxes inline-level?
224218

225219
<h4 id="display-inside-outside">
226220
Ruby-specific 'display-inside' and 'display-outside' values</h4>
@@ -265,10 +259,9 @@ <h4 id="block-ruby">
265259
This allows styling the element as a block,
266260
while correctly maintaining the internal ruby structure.
267261

268-
<p class="issue">
262+
<p>
269263
Note: There is no dedicated block-level 'display' shorthand keyword
270264
because ruby is fundamentally an inline layout feature.
271-
<span class="issue">We might need one to handle 'display' blockification, though. :(</span>
272265

273266
<p>Absolute positioning or floating an element causes its 'display' value
274267
to compute to a block-level equivalent. (See [[!CSS21]] section 9.7.)

0 commit comments

Comments
 (0)