W3C home > Mailing lists > Public > www-style@w3.org > June 2015

[css-text] overflow-wrap: break-word

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 10 Jun 2015 12:30:44 +0200
Message-Id: <0EE5D148-39F4-4AF7-AB7E-08583AD971D5@rivoal.net>
To: www-style list <www-style@w3.org>
As surfaced during the discussion of pre-wrap, there is an ambiguity in the
definition of overflow-wrap: break-word.

> An unbreakable "word" may be broken at an arbitrary point if there are no
> otherwise-acceptable break points in the line.

''word'' isn't defined, which means it isn't quite clear what can or cannot
be broken. For instance, can you break in the middle of an sequence of &nbsp;?

I'd argue that you should break. The goal of this property/value is to be an
escape hatch, letting you break wherever if that's what it takes to avoid
overflow.

I suggest changing this sentence in the definition to:

 An otherwise unbreakable sequence of <a>characters</a> may be broken at
 an arbitrary point if there are no otherwise-acceptable break points in
 the line.

I wrote a quick test to check, and it least in simple cases (i.e. with
actual &nbsp;, not with semi-magic preserved sequences of white-space
when using white-space:pre-wrap) this is what everybody does (tested IE 11,
Chrome, Safari, Firefox):

http://jsbin.com/sitowo/1/edit?html,css,output

- Florian
Received on Wednesday, 10 June 2015 10:31:13 UTC

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