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

On Mon, Feb 15, 2021, at 4:40 PM, fantasai wrote:
> On 3/11/15 6:53 PM, Xidorn Quan wrote:
>  > 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.
> 
> We're currently defining the annotation container not as an inline box, but as 
> a sort of wrapper around the various inline annotation boxes, so the problem 
> of the annotation container’s box affecting annotation layout goes away.
> 
> There do remain some issues open about inheritance into anonymous annotation 
> children of the annotation box, though, e.g. 
> https://github.com/w3c/csswg-drafts/issues/5962 which discusses inheritance 
> into anonymous inter-annotation white space boxes.
> 
> I'm going to call this thread resolved, since we solved the case you gave :) 
> but if you have any further thoughts on inheritance of annotation and 
> annotation container styles, feel free to file on GH.

Sounds good to me. I agree that case has been resolved in the current definition.

- Xidorn

Received on Monday, 15 February 2021 10:39:55 UTC