W3C home > Mailing lists > Public > www-style@w3.org > March 2015

[css-ruby] Propose to make anonymous ruby text container "inherit" styles from their child

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Thu, 12 Mar 2015 09:53:53 +1100
Message-ID: <CAMdq699UxZzu-J8rznRnNj5gA=a0AJv-DacydW+zvMH0aCSpsA@mail.gmail.com>
To: www-style list <www-style@w3.org>
It is always a problem that anonymous ruby text containers are not affected
by styles of their children.

In most cases, it is not necessary for authors to be aware of the existence
of the anonymous ruby text container. But the fact that the anonymous box
inherits styles from its parent could indeed cause some weired result
sometimes. Consider the following example:

<ruby><rb>base1<rb>base2<rt>text1<rt style="vertical-align:
top">text2</ruby>

In this example, authors should expect that "text2" is aligned with "text1"
because there is no element taller than them in the annotation. But with
the current spec, "text2" may be placed higher than "text1" because the
anonymous ruby text container inherits line-height and font-size from
<ruby>, which makes the line of annotation be actually 2x as tall as it is
expected.

Since styles of anonymous boxes are not inherited by their children, there
is no cyclic dependency.

- Xidorn
Received on Wednesday, 11 March 2015 22:55:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC