Skip to content

Commit ac67475

Browse files
committed
[css-ruby] Add section on text decoration. Clarify that margin boxes of internal ruby boxes are accomodated in layout.
1 parent f6de85e commit ac67475

File tree

2 files changed

+95
-6
lines changed

2 files changed

+95
-6
lines changed

css-ruby/Overview.bs

+34-2
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ Ruby Layout</h2>
663663
aligned according to its 'vertical-align' property
664664
exactly as if its <i>ruby bases</i> were a regular sequence of inline boxes.
665665
Each <i>ruby base container</i> is sized and positioned
666-
to contain exactly the full height of its <i>ruby bases</i>.
666+
to contain exactly all of its <i>ruby bases</i>’ margin boxes.
667667

668668
<p><i>Ruby annotations</i> associated with the <i>base level</i>
669669
are then positioned with respect to their <i>ruby base boxes</i>
@@ -672,7 +672,15 @@ Ruby Layout</h2>
672672
are aligned to each other as if they were inline boxes
673673
participating in the same inline formatting context.
674674
Each <i>ruby annotation container</i> is sized and positioned
675-
to contain exactly the full height of its <i>ruby annotations</i>.
675+
to contain exactly all of its <i>ruby annotations</i>’ margin boxes.
676+
677+
<p><i>Ruby annotation containers</i> are stacked outward
678+
over or under their corresponding <i>ruby base container</i>,
679+
without any intervening space.
680+
681+
<p class="issue">Should block-axis margins collapse?
682+
This makes layout more robust,
683+
but is inconsistent with how inlines behave along the inline-axis.
676684

677685
<p>A ruby container (or fragment thereof)
678686
measures as wide as the content of its widest level.
@@ -687,6 +695,9 @@ Ruby Layout</h2>
687695
when ruby content is narrower than the measure of its box
688696
is specified by the 'ruby-align' property.
689697

698+
<p class="issue">Should the ruby bases and annotations size to the column,
699+
or size to the content?
700+
690701
<h3 id="inter-character-layout">
691702
Inter-character Ruby Layout</h3>
692703

@@ -1234,6 +1245,27 @@ Ruby Text Distribution: the 'ruby-align' property</h3>
12341245
elements. This ratio is computed by taking into consideration the widest
12351246
element within each column.</p>
12361247
-->
1248+
1249+
<h3 id="ruby-text-decoration">
1250+
Ruby Text Decoration</h3>
1251+
1252+
<p>Text decoration does not propagate from the base text to the annotations.
1253+
<p>When text decoration is specified on an ancestor of the ruby,
1254+
it is drawn across the entire content area of the ruby base container,
1255+
including any extra space added on either side of the ruby base contents to accommodate long annotations.
1256+
When text decoration is specified on a ruby base itself,
1257+
this extra space is not decorated,
1258+
similar to how a box's own padding is not decorated when text decoration is specified directly on that box. [[!CSS3-TEXT-DECOR]]
1259+
1260+
<p>Text decoration may be specified directly on ruby base containers
1261+
and ruby annotation containers:
1262+
in such cases it is propagated to all of the container's bases or annotations (respectively),
1263+
and is also drawn between them.
1264+
1265+
<p class="issue">This section needs some clarification about
1266+
drawing decorations between the content of adjacent bases/annotations.
1267+
Depends on if those boxes are as wide as their column or not.
1268+
12371269
<h2 id="edge-effects">
12381270
Edge Effects</h2>
12391271

css-ruby/Overview.html

+61-4
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ <h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="cont
246246
Sharing Annotation Space: the <span class="property" data-lt="ruby-merge">ruby-merge</span> property</span></a>
247247
<li><a href="#ruby-align-property"><span class="secno">4.3</span> <span class="content"><span></span>
248248
Ruby Text Distribution: the <span class="property" data-lt="ruby-align">ruby-align</span> property</span></a>
249+
<li><a href="#ruby-text-decoration"><span class="secno">4.4</span> <span class="content">
250+
Ruby Text Decoration</span></a>
249251
</ul>
250252
<li><a href="#edge-effects"><span class="secno">5</span> <span class="content">
251253
Edge Effects</span></a>
@@ -1180,7 +1182,7 @@ <h2 class="heading settled" data-level="3" id="ruby-layout"><span class="secno">
11801182
aligned according to its <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/visudet.html#propdef-vertical-align">vertical-align</a> property
11811183
exactly as if its <i>ruby bases</i> were a regular sequence of inline boxes.
11821184
Each <i>ruby base container</i> is sized and positioned
1183-
to contain exactly the full height of its <i>ruby bases</i>.
1185+
to contain exactly all of its <i>ruby bases</i>’ margin boxes.
11841186

11851187
</p>
11861188
<p><i>Ruby annotations</i> associated with the <i>base level</i>
@@ -1190,7 +1192,17 @@ <h2 class="heading settled" data-level="3" id="ruby-layout"><span class="secno">
11901192
are aligned to each other as if they were inline boxes
11911193
participating in the same inline formatting context.
11921194
Each <i>ruby annotation container</i> is sized and positioned
1193-
to contain exactly the full height of its <i>ruby annotations</i>.
1195+
to contain exactly all of its <i>ruby annotations</i>’ margin boxes.
1196+
1197+
</p>
1198+
<p><i>Ruby annotation containers</i> are stacked outward
1199+
over or under their corresponding <i>ruby base container</i>,
1200+
without any intervening space.
1201+
1202+
</p>
1203+
<p class="issue" id="issue-b36a4b34"><a class="self-link" href="#issue-b36a4b34"></a>Should block-axis margins collapse?
1204+
This makes layout more robust,
1205+
but is inconsistent with how inlines behave along the inline-axis.
11941206

11951207
</p>
11961208
<p>A ruby container (or fragment thereof)
@@ -1207,6 +1219,10 @@ <h2 class="heading settled" data-level="3" id="ruby-layout"><span class="secno">
12071219
when ruby content is narrower than the measure of its box
12081220
is specified by the <a class="property" data-link-type="propdesc" href="#propdef-ruby-align">ruby-align</a> property.
12091221

1222+
</p>
1223+
<p class="issue" id="issue-2847424d"><a class="self-link" href="#issue-2847424d"></a>Should the ruby bases and annotations size to the column,
1224+
or size to the content?
1225+
12101226
</p>
12111227
<h3 class="heading settled" data-level="3.1" id="inter-character-layout"><span class="secno">3.1. </span><span class="content">
12121228
Inter-character Ruby Layout</span><a class="self-link" href="#inter-character-layout"></a></h3>
@@ -2013,6 +2029,32 @@ <h3 class="heading settled" data-level="4.3" id="ruby-align-property"><span clas
20132029

20142030
<p class="issue" id="issue-c66abaa7"><a class="self-link" href="#issue-c66abaa7"></a>Add a paragraph explaining how to distribute space in situations with spanning annotations.
20152031

2032+
2033+
</p>
2034+
<h3 class="heading settled" data-level="4.4" id="ruby-text-decoration"><span class="secno">4.4. </span><span class="content">
2035+
Ruby Text Decoration</span><a class="self-link" href="#ruby-text-decoration"></a></h3>
2036+
2037+
2038+
<p>Text decoration does not propagate from the base text to the annotations.
2039+
</p>
2040+
<p>When text decoration is specified on an ancestor of the ruby,
2041+
it is drawn across the entire content area of the ruby base container,
2042+
including any extra space added on either side of the ruby base contents to accommodate long annotations.
2043+
When text decoration is specified on a ruby base itself,
2044+
this extra space is not decorated,
2045+
similar to how a box’s own padding is not decorated when text decoration is specified directly on that box. <a data-link-type="biblio" href="#biblio-css3-text-decor">[CSS3-TEXT-DECOR]</a>
2046+
2047+
</p>
2048+
<p>Text decoration may be specified directly on ruby base containers
2049+
and ruby annotation containers:
2050+
in such cases it is propagated to all of the container’s bases or annotations (respectively),
2051+
and is also drawn between them.
2052+
2053+
</p>
2054+
<p class="issue" id="issue-01ada3e0"><a class="self-link" href="#issue-01ada3e0"></a>This section needs some clarification about
2055+
drawing decorations between the content of adjacent bases/annotations.
2056+
Depends on if those boxes are as wide as their column or not.
2057+
20162058
</p>
20172059
<h2 class="heading settled" data-level="5" id="edge-effects"><span class="secno">5. </span><span class="content">
20182060
Edge Effects</span><a class="self-link" href="#edge-effects"></a></h2>
@@ -2478,15 +2520,15 @@ <h3 class="no-num heading settled" id="normative"><span class="content">Normativ
24782520
<dd>Bert Bos; et al. <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
24792521
<dt id="biblio-css3-display"><a class="self-link" href="#biblio-css3-display"></a>[CSS3-DISPLAY]
24802522
<dd>Tab Atkins. <a href="http://www.w3.org/TR/2014/WD-css-display-3-20140220/">CSS Display Module Level 3</a>. 20 February 2014. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2014/WD-css-display-3-20140220/">http://www.w3.org/TR/2014/WD-css-display-3-20140220/</a>
2523+
<dt id="biblio-css3-text-decor"><a class="self-link" href="#biblio-css3-text-decor"></a>[CSS3-TEXT-DECOR]
2524+
<dd>Elika J. Etemad; Koji Ishii. <a href="http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/">CSS Text Decoration Module Level 3</a>. 1 August 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a href="http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/">http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/</a>
24812525
<dt id="biblio-css3text"><a class="self-link" href="#biblio-css3text"></a>[CSS3TEXT]
24822526
<dd>Elika J. Etemad; Koji Ishii. <a href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">CSS Text Module Level 3</a>. 13 November 2012. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
24832527
<dt id="biblio-rfc2119"><a class="self-link" href="#biblio-rfc2119"></a>[rfc2119]
24842528
<dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
24852529
</dl>
24862530
<h3 class="no-num heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
24872531
<dl>
2488-
<dt id="biblio-css3-text-decor"><a class="self-link" href="#biblio-css3-text-decor"></a>[CSS3-TEXT-DECOR]
2489-
<dd>Elika J. Etemad; Koji Ishii. <a href="http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/">CSS Text Decoration Module Level 3</a>. 1 August 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a href="http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/">http://www.w3.org/TR/2013/CR-css-text-decor-3-20130801/</a>
24902532
<dt id="biblio-css3-writing-modes"><a class="self-link" href="#biblio-css3-writing-modes"></a>[CSS3-WRITING-MODES]
24912533
<dd>Elika J. Etemad; Koji Ishii. <a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">CSS Writing Modes Module Level 3</a>. 15 November 2012. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/</a>
24922534
<dt id="biblio-css3val"><a class="self-link" href="#biblio-css3val"></a>[CSS3VAL]
@@ -2637,6 +2679,15 @@ <h2 class="no-num heading settled" id="issues-index"><span class="content">Issue
26372679
Waiting until layout is better-defined to find out...
26382680

26392681
<a href="#issue-9b177ca3"></a></div>
2682+
<div class="issue">Should block-axis margins collapse?
2683+
This makes layout more robust,
2684+
but is inconsistent with how inlines behave along the inline-axis.
2685+
2686+
<a href="#issue-b36a4b34"></a></div>
2687+
<div class="issue">Should the ruby bases and annotations size to the column,
2688+
or size to the content?
2689+
2690+
<a href="#issue-2847424d"></a></div>
26402691
<div class="issue">Or should it become a quasi-base between two bases?<a href="#issue-029133da"></a></div>
26412692
<div class="issue">
26422693
Insert scanned example so people don’t think this is just the ramblings of an insane spec-writer.
@@ -2645,7 +2696,13 @@ <h2 class="no-num heading settled" id="issues-index"><span class="content">Issue
26452696
<div class="issue"><span class="issuehead">Issue-107: </span> Roland Steiner has requested the addition of an auto value as default. See <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=ruby-position%3A+undesirable+default+value+%27before%27+for+complex+ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=www-style&amp;resultsperpage=20&amp;sortby=date">this thread</a> and <a href="http://www.w3.org/Search/Mail/Public/advanced_search?keywords=&amp;hdr-1-name=subject&amp;hdr-1-query=Styling+of+complex+Ruby&amp;hdr-2-name=from&amp;hdr-2-query=&amp;hdr-3-name=message-id&amp;hdr-3-query=&amp;period_month=&amp;period_year=&amp;index-grp=Public__FULL&amp;index-type=t&amp;type-index=public-i18n-core&amp;resultsperpage=20&amp;sortby=date">this one</a>.<a href="#issue-8b54b949"></a></div>
26462697
<div class="issue">Add a paragraph explaining how to distribute space in situations with spanning annotations.
26472698

2699+
26482700
<a href="#issue-c66abaa7"></a></div>
2701+
<div class="issue">This section needs some clarification about
2702+
drawing decorations between the content of adjacent bases/annotations.
2703+
Depends on if those boxes are as wide as their column or not.
2704+
2705+
<a href="#issue-01ada3e0"></a></div>
26492706
<div class="issue">
26502707
I suspect overhanging interacts with alignment in some cases;
26512708
might need to look into this later.

0 commit comments

Comments
 (0)