W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-ruby] Nested Ruby

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 02 Jul 2014 23:32:43 -0700
Message-ID: <53B4F90B.3010600@inkedblade.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>, www-style@w3.org
On 07/02/2014 01:47 PM, Boris Zbarsky wrote:
> On 7/2/14, 4:25 PM, fantasai wrote:
>>    # For the purpose of the rules above, a ruby container directly
>>    # parented by a ruby container is considered to be a ruby base
>>    # container.
> Er, that's pretty confusing.  Why not just do that directly in the
> algorithm instead?  That would be much preferable.  For example,
> it would make it clear that this stuff is nothing like the table
> setup and the same code should not be reused for it!


>> So, yes, this particular box structure is left as-is.
> Would the desired behavior not be achievable if the inner ruby
> container got wrapped in a ruby base?

Depends on what you then do with ruby containers wrapped in ruby
bases. The problem here is trying to make nested <ruby> work, e.g.
this is expected to work:

   <ruby>base1<rt>note1</rt>base2<rt>note2</rt></ruby> <rt>NOTE12</rt>
   <ruby>base3<rt>note3</rt>base4<rt>note5</rt></ruby> <rt>NOTE34</rt>
   <rb>base5</rb> <rt>note5</rt> <rtc>NOTE5</rtc>

note1 note2  note3 note4 base5
base1 base2  base3 base4 note5
   NOTE12        NOTE34   NOTE5

The outer ruby structure needs to be aware of the inner ruby annotations
so it doesn't overwrite them, and the notes within each level need to be
aware of each other so they don't collide even when ruby annotations are
allowed to overhang, and the contents of each level of annotation should

It's possible collision avoidance is better handled at layout time, and
we just need to nest the inner ruby container inside a ruby base. That
probably would also handle cases like

   <rb>Some text that's long <ruby><rb>base<rt>note</ruby> more text</rb>
   <rt>An annotation that shouldn't collide with "note"</rt>

but it might make alignment a bit tricky. (At this point, good alignment
is not important, but at some point in the future I suspect people will

Received on Thursday, 3 July 2014 06:33:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC