Closed Bug 1807877 Opened 2 years ago Closed 2 years ago

Flexbox sizing incorrectly reported for icon with max-width

Categories

(Core :: Layout: Flexbox, defect)

Firefox 108
defect

Tracking

()

RESOLVED DUPLICATE of bug 1801581
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

  1. Put a flexbox inside a flexbox
  2. Put an SVG within the inner flexbox
  3. Size the inner SVG with max-width and max-height (not width or height)
  4. EXPECTED: Good icon size. ACTUAL: 0x0
  5. 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.

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.

Component: Untriaged → Layout: Flexbox
Product: Firefox → Core

: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.

Flags: needinfo?(aethanyc)

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Most likely a dupe of bug 1801581, but I'll let Ting-Yu confirm.

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.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1801581
Flags: needinfo?(aethanyc)
Resolution: --- → DUPLICATE

Awesome, glad this is fixed!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: