W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: FW: NoWrap property

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 9 Dec 2008 10:21:40 +1300
Message-ID: <11e306600812081321g4bd6210cm4ecade03ab248f7b@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "Alex Mogilevsky" <alexmog@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
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.

"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
Received on Monday, 8 December 2008 21:22:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:42 UTC