[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 
http://dev.w3.org/csswg/css-ruby/#anony-gen-trim-space the behavior of 
testcase #3 is clear, I believe: it renders like so:

                TEXT
           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:

               TEXT
           abcdBASE

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.

-Boris

Received on Thursday, 31 July 2014 17:24:05 UTC