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:51:58 +1300
Message-ID: <11e306600812081351g4712d1e7qa83155591ded6724@mail.gmail.com>
To: "Alex Mogilevsky" <alexmog@microsoft.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "Bjoern Hoehrmann" <derhoermi@gmx.net>, "www-style@w3.org" <www-style@w3.org>
On Tue, Dec 9, 2008 at 10:31 AM, Alex Mogilevsky <alexmog@microsoft.com>wrote:

>  I was trying to understand the two principles from the previous messageā€¦
> Both make sense, but why just using one of them would not be enough?
The practical reason is that I think they match people's expectations. It
surprises people if <span style="white-space:pre"> </span> does not behave
just like a non-breaking space, and if <span style="white-space:nowrap">
</span> actually creates a break opportunity. But it also surprises people
if <span style="white-space:nowrap">A</span> behaves differently from a
stand-alone A.

I think these waters have been muddied by the use of a property called
'white-space' to control general line-breaking, but that's not the whole
problem. I think it would still be surprising if <span
style="line-breaking:nowrap">A</span> did not allow a line break between the
elements; the natural intuition is that styles affect behaviour "inside" the
element but not "outside" the element and a line break is possible "outside"
these elements.

And that's where intuitions about white space are different. People don't
think about breaking *after* a space, people think about breaking *at* or
*inside* a space since the position of the space is irrelevant to the
rendering. People aren't not used to thinking about a break opportunity
being after the space and therefore possibly not controlled by the style on
the space itself. Only browser implementers think like that :-).

Sorry about being all touchy-feely, but the important thing is the facts of
the first paragraph.

 E.g. why did you decide that <nowrap> has to remove break opportunity after
> space but not after a dash (as in attached example)?
> Yes, that discrepancy is a pain, but it's less worrying than the
alternatives IMHO.

"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:52:45 UTC

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