Flexbox sizing incorrectly reported for icon with max-width
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox108 | --- | wontfix |
firefox109 | --- | fix-optional |
firefox110 | --- | affected |
People
(Reporter: bugzilla, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0
Steps to reproduce:
Test case and descriptions: https://codepen.io/alanhogan/pen/RwBabBZ
- Put a flexbox inside a flexbox
- Put an SVG within the inner flexbox
- Size the inner SVG with
max-width
andmax-height
(not width or height) - EXPECTED: Good icon size. ACTUAL: 0x0
- Try to fix it by using flex-shrink and flex-basis…
Actual results:
The icon is rendered at a good size but it takes up 0 layout space (bug!) in the inner flexbox
Expected results:
The icon layout should increase the size of the inner flexbox (with the flex-shrink/flex-basis fix applied). Without this fix, it should probably render the icon as 16x16 like other browsers do.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Flexbox' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b6d4cc392199eac68b7641fe6ce2be73a84381f6&tochange=76c1fb5130dcd9f4562826d42194ebf74ca268c8
More screen shots — I thought I would be able to upload these, but I guess not:
https://alanhogan.com/images/screenshots/correct%20rendering%20in%20chrome%20108.png
https://alanhogan.com/images/screenshots/Firefox%20buggy%20rendering%20with%20no%20fixes.png
https://alanhogan.com/images/screenshots/Firefox%20buggy%20rendering%20with%20overlapping%20elements%20using%20flex-basis.png
https://alanhogan.com/images/screenshots/Firefox%20patched%20rendering.png
https://alanhogan.com/images/screenshots/Inspector%20-%20Icon%20-%20Firefox%20buggy%20rendering%20with%20overlapping%20elements%20using%20flex-basis.png
https://alanhogan.com/images/screenshots/Inspector%20-%20Inner%20Flexbox%20-%20Firefox%20buggy%20rendering%20with%20overlapping%20elements%20using%20flex-basis.png
Comment 5•2 years ago
|
||
:TYLin, since you are the author of the regressor, bug 1340715, could you take a look? Also, could you set the severity field?
For more information, please visit auto_nag documentation.
Comment 6•2 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 7•2 years ago
|
||
Most likely a dupe of bug 1801581, but I'll let Ting-Yu confirm.
Comment 8•2 years ago
|
||
Alan, thank you for reporting the bug with detailed testcase, workaround, and screenshot!
Like Emilio said in comment 7, this is fixed by bug 1801581. I test the codepen in comment 0 in Firefox Nightly 2023-01-04, and it works fine.
Description
•