W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-text] overflow-wrap vs word-wrap

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Tue, 01 May 2012 11:17:47 +0800
Message-ID: <4F9F55DB.1080502@csail.mit.edu>
To: fantasai <fantasai.lists@inkedblade.net>
CC: WWW Style <www-style@w3.org>
(12/05/01 10:07), fantasai wrote:
> The -wrap properties determine whether you're allowed to soft-wrap,
> whereas the -break properties determine a legitimate break point is.
> So there is a logic to that distinction.

But 'word-wrap'/'overflow-wrap' and 'word-break' share a same
precondition: they only apply when 'text-wrap' is not 'none'. (This was
changed from IE7 to IE8 it seems: in IE9, 'word-wrap' does apply even
when 'white-space' is 'nowrap'[1].)

I believe dividing the line breaking process into "deciding legitimate
break point" and "controlling a legitimate break point" is not as
intuitive as the following description

"word-break: overflow;" breaks the word when it's about to overflow no
matter what (i.e. there's no other possible breaking point in the same
line).

"word-break: break-all;" always break the word.

because what authors would care is whether and how words are broken and
not complicated logic around "line breaking opportunity". This also
disallows "word-break: break-all; word-wrap: break-word;" which is
mostly a useless combination. (I doubt there are use cases for
"word-break: keep-all; word-wrap: break-word;" too)


[1] tested with examples in
http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/wordWrap.htm
. Note that it defaults to IE7 mode.


Cheers,
Kenny
Received on Tuesday, 1 May 2012 03:18:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:53 GMT