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, 06 Apr 2017 09:34:13 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-292120598-1491471252-sysbot+gh@w3.org>
> Just curious, do East Asian use cases not want to break between consecutive . characters? 

It depends why you have consecutive . characters. I would guess that the most common one is using three of them (...) instead of the ellipsis character (… U+2026). In that case, you do not want a break between the characters.
So you get
|どうでしょ   |
|う...      |
and not
|..         |

> What's `break-word`?

[`overflow-wrap: break-word`](https://drafts.csswg.org/css-text-3/#overflow-wrap-property)
Makes it so that there can be linebreaks anywhere, including between a sequence of "." **if things would otherwise overflow**.

That last part means it is probably not what you're after, because what it will do is:
|foo bar     |
|.......     |
it doesn't need to break between the periods to prevent the first line from overflowing, as breaking between baz works as well. It does need to break between the periods on the second line to prevent overflowing, so it does. If that's what you want, `overflow-wrap: break-word`

If what you want is this
|foo bar baz.|
|...         |
Then I think the only solution that matches the various specs is to put `<wbr>` between the periods.

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1171#issuecomment-292120598 using your GitHub account
Received on Thursday, 6 April 2017 09:34:20 UTC

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