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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 30 Apr 2012 22:01:52 -0700
Message-ID: <4F9F6E40.4000208@inkedblade.net>
To: www-style@w3.org
On 04/30/2012 08:17 PM, Kang-Hao (Kenny) Lu wrote:
> (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].)

All of the properties that control line-breaking only apply when text-wrap
is not 'none'. If 'text-wrap' is none, then you're not allowed to line break!

> 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)

Note that "word-break: break-all" doesn't allow breaks between,
e.g. きょ or immediately before a period, or between two consecutive
dashes, whereas word-wrap: break-word means, if it's necessary to
make it not overflow, you can break *anywhere*.

Also if they are all combined, you can't have
"word/overflow-wrap: break-word; word-break: keep-all", and that
is a useful combination.

Received on Tuesday, 1 May 2012 05:02:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:15 UTC