Re: FW: NoWrap property

Robert O'Callahan wrote:
> In Gecko we follow two principles:
> 1) Break opportunities induced by white space are entirely governed by 
>    the value of the 'white-space' property on the enclosing element. So, 
>    spaces that are white-space:nowrap never create break opportunities.
> But
> 2) When a break opportunity exists between two non-white-space 
>    characters, e.g. between two Kanji characters, we consult the value of 
>    'white-space' for the nearest common ancestor element of the two 
>    characters to decide if the break is allowed.
> 
> I think these principles are reasonably intuitive and useful.

I agree with these.

> The first principle explains our rendering of your testcases. In your third 
> testcase, the space after the nowrap span is collapsed away but we still 
> allow it to create a linebreak opportunity, since it's white-space:normal.

This is something that's not clear in the spec: does removed whitespace still
create a break opportunity? It would be good to discuss this in the context
of what we want for CSS3. E.g. suppose there is a 'discard' value for white
space.

~fantasai

Received on Monday, 8 December 2008 21:06:14 UTC