word-break: break-all and word-wrap: break-word to continuous punctuation marks such as "................" in Chrome 67Note: I know that word-wrap is an alias for overflow-wrap.
I won't deal with this name fluctuation here, and I will unify the term as word-wrap below.
This page is related to Issue 852313.
Postscript: This is not a bug but a specification, and we're waiting for the implementation of 'line-break: anywhere' (Issue 720205).
Postscript 2: Issue 720205 was conditionally fixed.
We can now use 'line-break: anywhere' by enabling chrome://flags/#enable-experimental-web-platform-features.
I want
(or
), but there's no way to get this result in Chrome 67.
If I get
, I also get
.
If I get
, I also get
.
There is no way to make
and
coexist in one element.
It's a dilemma.
Details are as follows:
[Correct] By design, this is a natural result.
[Correct] This is also correct behavior.
[Well-known issue] In Chrome, word-break: break-all is incompetent for punctuation marks such as ",", ".", ":", ";", "、" and "。".
[New issue] In Chrome, adding word-wrap: break-word to try to avoid 3 does not change the situation of punctuation marks as long as there is word-break: break-all.
Perhaps it seems to be caused by some exceptional processing (non-breaking processing or something) being applied to punctuation marks when break-all, and what is worse, the priority of the processing seems to be higher than word-wrap: break-word. So word-wrap: break-word doesn't work in this situation.
The punctuation marks are wrapped only after setting the word-break value to something other than break-all (e.g. normal).
However, in word-break: normal, it returns to the same result as 2, and the specific effect of break-all such as dividing "short" into "s" and "hort", etc. will be lost.
[New issue] Moreover, when word-break: keep-all, it seems that the exceptional processing to the punctuation marks above will not be done.
In Chrome, oddly enough, under the circumstances of word-wrap: break-word, it looks as if a strange reversal phenomenon has occurred that punctuation marks penetrate to the right when break-all, and punctuation marks wrap around when keep-all. Please compare with 4.
[New issue] A value word-break: break-word seems to exist only in Chrome. I found it with DevTools.
This value leads to a warning as an invalid value in other browsers, but seems to work similarly to word-wrap: break-word only in Chrome.
Does the existence of this strange value have something to do with the strange implementation of Chrome's word-break?
Chrome's word-break: break-all is broken.
I request of Chrome that the exceptional processing to the punctuation marks should be removed in case of break-all.
Conversely, this processing should be done when word-break: keep-all.
Note: There is also a similar bug in Edge. I think that the behavior of Firefox 60 is ideal.