[css-text] Phrase line breaking should fallback to normal line breaking if overflow
@frivoal is already working on this.
Since Jun 19, 2026.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
We've got a feedback that when a phrase can't fit in a line, it should fallback to normal line breaking.
For example:
<div style="width: 5em">こんにちは。</em>
This line overflows when the phrase engine computes "こんにちは" as a phrase.
Authors can prevent the overflow by:
div {
word-break: phrase; /* the keyword TBD */
overflow-wrap: anywhere;
}
but this produces:
こんにちは
。
which breaks the Japanese line breaking rules not to break before the fullwidth period. From authors' point of view, this should break as below instead:
こんにち
は。
Since the exact algorithm to determine the phrase boundaries is UA-dependent, this could be either part of the spec or part of the UA's algorithm, whichever works for me but wanted to share the feedback.
@litherum @frivoal @fantasai
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.