Re: FW: NoWrap property

On Tue, Dec 9, 2008 at 10:05 AM, fantasai <fantasai.lists@inkedblade.net>wrote:

> Robert O'Callahan wrote:
>
>  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.


In CSS3 white-space-collapse and text-wrap are orthogonal, so while it might
not be 100% obvious, it could actually be useful for
white-space-collapse:discard to work with text-wrap:normal to hide all
white-space but continue using it for breaking purposes. It might make more
sense to name the white-space-collapse value 'hide' instead of 'discard'.

I do think it's desirable to allow collapsed-away whitespace to create break
opportunities. Otherwise we have the situation that
<span style="white-space:nowrap">Hello</span> Kitty
has a break opportunity but adding a space in the span to get
<span style="white-space:nowrap">Hello </span> Kitty
makes that break opportunity go away. It's rare for adding text to remove
line breaks, and would definitely shock users in editing situations.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Monday, 8 December 2008 21:22:19 UTC