Closed frivoal closed 3 months ago
Another place that almost but not quite defines this (in the same direction) may be this:
For soft wrap opportunities before the first or after the last character of a box, the break occurs immediately before/after the box (at its margin edge) rather than breaking the box between its content edge and the content.
Here, the soft wrap opportunity before and after each replaced element is the first or last thing in a box, but not the first/last character in a box.
So we could also fix this with the following addition:
For soft wrap opportunities before the first or after the last character, replaced element, or atomic inline of a box […]
The CSS Working Group just discussed [css-text-3] Disambiguation about soft wrap opportunities around replaced elements
, and agreed to the following:
RESOLVED: Clarify spec about soft-wrap oppos before/after characters to also reference atomic inlines.
Should there be a soft wrap opporunity in the middle of the following divs?
Currently, we don't have interop, with Chrome and Safari allowing a break, and Firefox not.
I believe that the spec is not clear. The parts that seem relevant but don't actually spell it out clearly would be the following two points from https://drafts.csswg.org/css-text-4/#line-break-details:
The goal of the first rule quoted above is to make replaced elements / atomic inlines break more than other things. The Firefox implementation makes then break less than ideographs, which goes against that expectation.
But I think a literal interpretation of the spec falls short of saying what to do, because:
So I think we should clarify that the Chrome/Webkit behavior is the intended one, and do so with the following two additions: