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

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

From: littledan via GitHub <sysbot+gh@w3.org>
Date: Wed, 05 Apr 2017 12:29:31 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-219566107-1491395370-sysbot+gh@w3.org>
littledan has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text-3] word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used ==
[word-break: break-all](https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all) is specified as:

> Breaking is allowed within “words”: in addition to normal soft wrap opportunities: specifically, any typographic character units resolving to the NU (“numeric”), AL (“alphabetic”), or SA (“Southeast Asian”) line breaking classes \[UAX14] are instead treated as ID (“ideographic characters”) for the purpose of line-breaking. Hyphenation is not applied. This option is used mostly in a context where the text consists predominantly of CJK characters with only short non-CJK excerpts, and it is desired that the text be better distributed on each line.

For layout implementations based on UAX 14, this tailoring doesn't affect code points like "." (FULL STOP), which is categorized as IS. In UAX 14,

> When not used in a numeric context, infix separators are sentence-ending punctuation. Therefore they always prevent breaks before.

This is codified in later text, where LB13 specifies not breaking before IS, and breaking around ideographs is specified by LB31 (break everywhere else), which is at a lower precedence.

The result seems a little counter-intuitive. I would've expected `word-break: break-all` to break in the middle of a long string of `.`, for example, but it seems like it is specified to not do this. Was this the intended behavior?

Dumb, higher-level question: why doesn't `word-break: break-all` break at all grapheme boundaries?

cc @frivoal 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1171 using your GitHub account
Received on Wednesday, 5 April 2017 12:29:38 UTC

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