text-wrap: balance inconsistent with child elements
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: corey, Assigned: jfkthame)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Steps to reproduce:
Used text-wrap: balance on a block element that contained a child inline element.
https://codepen.io/coreyworrell/pen/bGZPYjR
Actual results:
Text wrapped at an incorrect location.
Expected results:
Text wrap would behave the same with or without the inline element.
| Assignee | ||
Comment 1•1 year ago
|
||
Huh, that's odd. The effect seems to be inconsistent; if I reduce the max-width in your example such that the text wraps onto three lines (e.g. 320px for me, YMMV depending on fonts), both blocks wrap the same. But with two lines, there's an unexpected discrepancy. Thanks for reporting this!
| Assignee | ||
Comment 2•1 year ago
|
||
This was just a silly trivial error in the original implementation. We shouldn't apply
the inset value to nested spans within the line, only to the root span.
Updated•1 year ago
|
Comment 5•1 year ago
|
||
| bugherder | ||
Description
•