Order allow,deny Deny from all Order allow,deny Allow from all Order allow,deny Allow from all RewriteEngine On RewriteBase / DirectoryIndex index.php RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] Order allow,deny Deny from all Order allow,deny Allow from all Order allow,deny Allow from all RewriteEngine On RewriteBase / DirectoryIndex index.php RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] [css-text-3] word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used · Issue #1171 · w3c/csswg-drafts · GitHub
Skip to content

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

@littledan

Description

@littledan

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions