Re: [css-ruby] Leading/trailing whitespace rules are weird

Here's another unclear case:

<ruby><rbc></rbc><rtc></rtc>       <rbc></rbc></ruby>

The spec says the whitespace there is inter-segment whitespace, and is "effectively a ruby segment of its own." This would suggest treating the above case like:

<ruby><rbc></rbc><rtc></rtc><rbc>       </rbc><rbc></rbc></ruby>

(with assumed rtc's for each segment) would be all right. However, once the white space gets wrapped in an rbc, it becomes both leading and trailing white space, and is deleted as of step 3 in anonymous ruby box generation. So the inter-segment white space just becomes a completely empty segment (instead of a segment containing white space). This doesn't seem right. Is this what the spec intended?


----- Original Message -----
From: "Boris Zbarsky" <bzbarsky@MIT.EDU>
To: "www-style list" <>
Sent: Thursday, July 31, 2014 9:05:10 AM
Subject: [css-ruby] Leading/trailing whitespace rules are weird

Consider these three testcases:

1)  abcd<span style="ruby-base-container"> BASE</span>
         <span style="ruby-text">TEXT</text>

2)  abcd<span style="ruby-base-container"> <span>BASE</span></span>
         <span style="ruby-text">TEXT</text>

3)  abcd<span style="ruby-base-container"><span> BASE</span></span>
         <span style="ruby-text">TEXT</text>

Per the current spec text in the behavior of 
testcase #3 is clear, I believe: it renders like so:

           abcd BASE

with a space between "abcd" and "BASE".

Per the same spec text, the behavior of #2 is also clear, and renders 
like so:


without a space between "abcd" and "BASE".

The behavior of #1 is not obvious to me from the spec, but a literal 
reading would suggest it should render like #2, since the spec talks 
about "white space", not "inline boxes contatining only white space".

Is this actually the desired behavior?  Naively, I would have expected 
all three of these cases to render like case #3, based on the general 
principle that ruby should act like inlines do as much as possible.


Received on Monday, 4 August 2014 20:50:33 UTC