Absolutely positioned with width auto parent div won't follow child image width
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect, P3)
Tracking
()
People
(Reporter: ooijunxiang0959, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
structure HTML tags with according to this fiddle and the CSS too
Link: https://jsfiddle.net/OoiJX/at95bxpd/2/
I figured out that the problem is because the main tag has padding (I am speaking according to the code in the link above) and when i switched the padding to #root, the problem is solved, but for other browsers, the code in the link works as expected. So i thought it might be a bug in Firefox
P.S : Sorry if i got the version wrongly, i find the version from Help->About Firefox and saw (82.0.3) so i assume it is Firefox 82
Actual results:
The parent width will not follow child width but in other browsers, it works as expected
Expected results:
The parent width should have the same width with the child img
Comment 1•4 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=9474cf8b8d18de259445d3860576837f0522e224&tochange=38fbb8418ffcddc43061ec9b1e347efaede8e72f
Updated•4 years ago
|
Updated•4 years ago
|
Comment 2•3 years ago
|
||
The severity field is not set for this bug.
:jwatt, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
Chrome also messes up here, but in the other direction, interestingly.
Assignee | ||
Comment 6•3 years ago
|
||
Percentages in abspos boxes resolve against the padding box, so we're resolving against the wrong box size. I have a patch which I think should fix this.
Assignee | ||
Comment 7•3 years ago
|
||
As percentages in abspos boxes resolve against the padding box.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b51a3956edfc Ignore padding when computing definite percentages if we're abspos boxes. r=mats
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26874 for changes under testing/web-platform/tests
Comment 10•3 years ago
|
||
bugherder |
Upstream PR merged by jgraham
Description
•