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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 31 Jul 2014 12:05:10 -0400
Message-ID: <53DA6936.5050408@mit.edu>
To: www-style list <www-style@w3.org>
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:

           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 Thursday, 31 July 2014 17:24:05 UTC

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