W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

Re: [csswg-drafts] [css-text-3] word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Thu, 13 Apr 2017 02:38:44 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-293761260-1492051123-sysbot+gh@w3.org>
Actually, I think there is another solution to this problem, which does not need anything new to be added to the spec.
```
white-space: pre;
overflow-wrap: break-word;
```
or depending on how you feel about breaks in consecutive runs of spaces maybe
```
white-space: pre;
overflow-wrap: break-word break-spaces;
```
That way, the fact that `overflow-wrap:break-word` only applies if there's no other break point is countered by the fact that `white-space:pre` has cancelled other break points.

So you would get
```
|foo bar baz.|
|............|
|...         |
```

@littledan, would this solve your problem, or does it have undesirable side effects?




-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1171#issuecomment-293761260 using your GitHub account
Received on Thursday, 13 April 2017 02:38:51 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC