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

(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 UTC