@@ -1423,7 +1423,11 @@ Ruby Positioning: the 'ruby-position' property</h3>
1423
1423
1424
1424
Otherwise, the ruby annotation becomes an <dfn dfn local-lt=inter-character>inter-character annotation</dfn> .
1425
1425
The annotation appears on the right of the base in horizontal text.
1426
- This forces the computed value of 'writing-mode' of the [=ruby annotation container=] to be ''vertical-rl'' .
1426
+ This forces the computed value of 'writing-mode' of the [=ruby annotation=] children of this [=ruby annotation container=] to be ''vertical-rl'' .
1427
+
1428
+ Note: The computed value of 'writing-mode' on the [=ruby annotation container=] itself is not affected.
1429
+ This is to avoid circular dependencies between computed values
1430
+ on the 'writing-mode' , 'display' , and 'ruby-position' properties on the same element.
1427
1431
1428
1432
This value is provided for the special case of traditional Chinese
1429
1433
as used especially in Taiwan:
@@ -1437,6 +1441,39 @@ Ruby Positioning: the 'ruby-position' property</h3>
1437
1441
<p class="caption"> “Bopomofo” ruby in traditional Chinese
1438
1442
(ruby annotation shown in blue for clarity) in horizontal layout
1439
1443
</div>
1444
+
1445
+ <div class=note>
1446
+ Note: As inheritance works on the element tree without accounting for anonymous boxes created for ruby layout,
1447
+ when using [=inter-character annotations=]
1448
+ authors need to be careful to avoid markup patterns involving
1449
+ an element-based [=ruby annotation container=] ,
1450
+ an anonymous [=ruby annotation=] ,
1451
+ and further descendant elements,
1452
+ as those descendants would inherit their writing mode from the [=ruby annotation container=] ,
1453
+ and not from the [=ruby annotation=] whose 'writing-mode' has been changed to ''vertical-rl'' .
1454
+
1455
+ <div class=example>
1456
+ <pre highlight=css> ruby { ruby-position: inter-character; }</pre>
1457
+ <xmp highlight=html><ruby> base<rtc><em> problematic</em> annotation</ruby></xmp>
1458
+
1459
+ In the above markup, an anonymous [=ruby annotation=] box is created as a child of the <code> <rtc></code> element
1460
+ to wrap the whole “problematic annotation”.
1461
+ Since it is a child of an [=annotation container=] whose 'ruby-position' is ''inter-character'' ,
1462
+ its 'writing-mode' will be ''vertical-rl'' , which is expected.
1463
+ However, the <code> <em></code> element inherits its 'writing-mode' directly from the <code> <rtc></code> element,
1464
+ which has not been forced to ''vertical-rl'' .
1465
+
1466
+ In this example, the explicit [=ruby annotation container=] element was not necessary,
1467
+ so using a [=ruby annotation=] element instead would avoid the problem:
1468
+
1469
+ <xmp highlight=html><ruby> base<rt><em> problematic</em> annotation</ruby></xmp>
1470
+
1471
+ If an explicit [=ruby annotation container=] element is needed,
1472
+ then using a [=ruby annotation=] element as well would also address the problem:
1473
+ <xmp highlight=html><ruby> base<rtc><rt><em> problematic</em> annotation</ruby></xmp>
1474
+ </div>
1475
+ </div>
1476
+
1440
1477
</dd>
1441
1478
</dl>
1442
1479
@@ -2221,7 +2258,10 @@ Changes</h2>
2221
2258
<h3 id="changes-20211202">
2222
2259
Changes since the 2 December 2021 WD</h3>
2223
2260
2224
- None yet.
2261
+ <ul>
2262
+ <li> Made the computed-value adjustement of 'writing-mode' on [=inter-character annotations=]
2263
+ apply to the [=ruby annotation box=] rather than the [=ruby annotation container box=] .
2264
+ </ul>
2225
2265
2226
2266
<h3 id="changes-20200429">
2227
2267
Changes since the 29 April 2020 WD</h3>
0 commit comments