Skip to content

[css-text-3] Line breaking opportunities at the boundary of a white-space:pre inline element #189

@frivoal

Description

@frivoal

Browsers differ in behavior when faced with the following, if the line-end would normally fall between お and か (i.e. at the boundary of the span):

<p>あいうえお<span style="white-space:pre">か</span>きくけこ</p>

Live example here: http://jsbin.com/bedumox/edit?html,css,output

Firefox and Edge (and presto) allow the break between お and か. Safari and Chrome don't. Language tagging and the switching the word-break property between auto and break-all does not make any difference.

I suspect the Firefox / Edge behavior is correct, and the the Chrome / Safari behavior is a side effect of a bug of theirs that suppresses break opportunities at element boundaries [1][2], but I did not manage to find a justification either way in the spec for the case I am discussing here.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=282134
[2] https://bugs.webkit.org/show_bug.cgi?id=158771

Metadata

Metadata

Labels

Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.TestedMemory aid - issue has WPT testsTracked in DoCcss-text-3Current Worki18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions