Setting text-wrap: balance to a parent doesn't affect its children with display inline-block
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: Thiemel.Jiri, Unassigned)
References
Details
Attachments
(1 file)
|
482 bytes,
text/html
|
Details |
Steps to reproduce:
If an element with text-wrap: balance contains only children with inline-block (and inline-flex, inline-grid) and there are no whitespaces between the children, the content doesn't get wrapped properly in Firefox.
Actual results:
The content doesn't get wrapped properly.
Expected results:
The content doesn't gets wrapped equally (balanced wrapping).
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Thanks for the bug report. Here's a reduced testcase that I think reproduces the issue you're describing.
In Firefox, the top section is unbalanced (4 boxes on the first line). The bottom section is balanced (3 boxes on the first line).
In Chrome, both the top and bottom section are balanced.
Comment 3•2 years ago
|
||
jfkthame, do you know why we're disagreeing with Chrome on testcase 1 here?
Comment 4•2 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #3)
jfkthame, do you know why we're disagreeing with Chrome on testcase 1 here?
Offhand, I can't think of a reason this shouldn't work; given that we will happily wrap the top section as 3 + 3 boxes if the available width is reduced a bit, I'd expect balance to be able to do the same thing.
Comment 5•11 months ago
|
||
Not sure if this is relevant but just to note the same issue happens for inline-flex children. Would love to see this fixed, as I am using this trick as an alternative to the currently non-existing flex-wrap: balance.
Description
•