[css-text] white-space: break-spaces shouldn't allow to break before the first ideographic space of a sequence
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: jfernandez, Unassigned)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
1- load the attached test case
Actual results:
The box with trailing ideographic space breaks the line, wrapping the red trailing space (actual.png)
Expected results:
The two boxes should be rendered in a single line (expected.png)
| Reporter | ||
Comment 1•5 years ago
|
||
| Reporter | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 4•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
| Reporter | ||
Comment 5•5 years ago
|
||
The CSS Text 3 specification states the following when defining the behavior of the 'break-spaces" value:
https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces
"A line breaking opportunity exists after every preserved white space character and after every other space separator (including between adjacent spaces)."
Additionally, in the Section 4.1 - The White Space Processing Rules, the Phase I states that again, encouraging to wrap space sequences AFTER any character; this implies that we can't break the sequence BEFORE the first space.
https://drafts.csswg.org/css-text-3/#collapse
" for break-spaces, a soft wrap opportunity exists after every space and every tab."
That's the behavior currently implemented in FF and other browsers for white space sequences, and it should be the same for ideographic spaces.
| Reporter | ||
Comment 6•5 years ago
|
||
It's worth mentioning that the spec also states that hanging is not allowed when using 'break-spaces':
https://drafts.csswg.org/css-text-3/#white-space-phase-2
"If white-space is set to break-spaces, hanging or collapsing the advance width of the spaces, tabs, or other space separators at the end of the line is not allowed; those that overflow must wrap to the next line."
However, I think this sentence is meant for spaces after the first one in the sequence. I've filled an issue for the CSS Text spec to clarify this, so if necessary, we can continue there the discussion about this point:
| Reporter | ||
Comment 7•5 years ago
|
||
I'm implementing this behavior for Chrome in https://crbug.com/1155633.
It could be that this bug is very related (perhaps duplicated ?) with these ones ?
https://bugzilla.mozilla.org/show_bug.cgi?id=1450228
https://bugzilla.mozilla.org/show_bug.cgi?id=1325807
https://bugzilla.mozilla.org/show_bug.cgi?id=1527141
Comment 8•3 years ago
|
||
Triaging as S3.
I do see Chrome rendering the testcase with both lines looking the same, like comment 2.
For some reason WebKit renders the first line like Chrome and the second line with no visible red block at all.
Description
•