CSS width: fit-content does not set width properly
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: gunfight7.gf, Unassigned)
Details
Steps to reproduce:
https://codepen.io/mrtipson/pen/jOpwojN
The codepen above reproduces the issue. It shows:
- green div (outer container)
- pink div (placeholder content)
- red div (image wrapper, positioned absolutely, and the element with the problematic width: fit-content)
- img (with additional striped background).
Notes:
issue still present in nightly and also on mobile
issue no longer happens if outer container (green) has any hard-coded height (uncomment in codepen).
expected behaviour using the same code observed on chromium and safari
Actual results:
Image wrapper element (red) is narrower than its child (image with striped background).
Expected results:
Image wrapper element (red) should be the same dimensions as child (img) element.
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
Hello, thank you for the report!
I managed to reproduce this issue on Windows 10 with Fx 110.0b2 and on macOS 10.15 with Fx 109.0 and latest nightly build.
If this is not the correct component, feel free to change it to a more appropriate one.
Setting as NEW so that the developers can have a look.
Thank you.
Description
•