Re: [css-ruby] White space collapse between ruby annotations

Ruby runs are partitioned by <rb> elements. Therefore, in your example:

> <ruby>
>   <rb>a</rb><rb>b</rb>
>   <rt>x␣</rt><rt>␣y</rt>
> </ruby>

The first run has a base of "a" with no ruby text.
The second run has a base of "b" with two ruby texts, "x␣" and "␣y"
In this case, I believe it makes sense to collapse the whitespace between the "x" and the "y."

In your third example:

> <ruby>
>   <rb>a</rb><rt>x␣</rt><rb>b</rb><rt>␣y</rt>
> </ruby>

The first run has a base of "a" with a text of "x␣"
The second run has a base of "b" with a text of "␣y"
In this case, I believe it doesn't make sense to collapse the whitespace between the "x" and the "y."

--Myles

> On Jul 8, 2015, at 12:29 AM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
> 
> It seems the current spec is not very clear about how white space collapse should happen on ruby annotations.
> 
> There is a sentence says "Where undiscarded white space is collapsible, it will collapse following the standard white space processing rules", but I don't find anywhere mentions the normal white spaces inside ruby annotation.
> 
> Let's see an example. If we have a ruby tag like:
> <ruby>
>   <rb>a</rb><rb>b</rb>
>   <rt>x␣</rt><rt>␣y</rt>
> </ruby>
> 
> If we consider the two ruby text boxes are in the same line, and thus use the standard processing rules to handle the white spaces here, we would get the same result as:
> <ruby>
>   <rb>a</rb><rb>b</rb>
>   <rt>x␣</rt><rt>y</rt>
> </ruby>
> 
> But it doesn't seem to make sense having a different result between this code and
> <ruby>
>   <rb>a</rb><rt>x␣</rt><rb>b</rb><rt>␣y</rt>
> </ruby>
> 
> Hence I propose that we do not collapse white space across the boundary of ruby text box.
> 
> - Xidorn

Received on Friday, 10 July 2015 19:13:59 UTC