[css-grid][flex]Intrinsic size on grid-subflex / subbitem keeps the image width whilst image is resized.
Categories
(Core :: Layout: Flexbox, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | affected |
People
(Reporter: hunboy, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Updated•6 years ago
|
I think I'm running into this issue as well, see https://codesandbox.io/s/cool-yalow-kcfdq
The idea is that I want to maintain an aspect ratio of 1/1 which img should do with an explicit height set, and does in other places.
An interesting part to this is that if I inspect the dom and hover the SizeHelper img, it shows the correct size, but the grid has not responded in kind.
Sorry if I'm in the wrong ticket, it's a little hard to tell what's going on. I was torn between this one and https://bugzilla.mozilla.org/show_bug.cgi?id=1439527
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Comment 4•2 years ago
|
||
This is still a valid issue as testcases still reproduce - however, we don't have any active non-testcase WebCompat breakage caused by this. Unsetting the webcompat-priority flags per our rules.
Comment 5•11 months ago
|
||
I'm building a website and I've hit this bug. It does not happen in Chrome nor Safari. I tried to work around this in many other ways but to no avail. The only solution is to re-think the whole layout basically, which defeats the purpose of being very responsive.
Should I file a WebCompat issue with the site in question? The test page is https://martyrio.pages.dev in the very home page, at mobile screen widths, but soon will be live in an official domain.
By disabling max-width: 100% in the images, it stops overflowing but triggers the same bug as described in this thread, where for some reason the parent element takes the width from the intrinsic size of the images, instead of the recalculated one (even though the image looks fine, including in the Browser Inspector). It shouldn't have overflown either in the first place. This does not happen in the other browsers.
Comment 6•11 months ago
|
||
(In reply to alejandro9r from comment #5)
I'm building a website and I've hit this bug. It does not happen in Chrome nor Safari. I tried to work around this in many other ways but to no avail. The only solution is to re-think the whole layout basically, which defeats the purpose of being very responsive.
Should I file a WebCompat issue with the site in question?
Please do (ideally at https://bugzilla.mozilla.org/enter_bug.cgi?product=Web%20Compatibility&component=Site%20Reports ), and please include a screenshot or screencast showing the issue. (Those will be handy since I'm not sure I'm seeing or reproducing the issue you're describing - the page looks and behaves the same in Firefox and Chrome at first glance, testing in a mobile-sized desktop browser and on an actual Android phone.)
Comment 7•11 months ago
|
||
Ok this is interesting. The overflow does not happen anymore on Firefox Beta for Android, but there is still some weird extra space to the right of the element occuring, despite the img element having the proper sizes in the Inspector. Will check further tomorrow.
Comment 8•11 months ago
|
||
I think the original issue is actually fixed now -- I'll track a fix range.
The attached testcase doesn't work anymore since its placeholder image hosting service has disappeared; but if I put in my own placeholder image, I see good results.
I'll tidy things up here and close this out. But in the meantime, please file a new bug for the issue you're seeing and please CC or needinfo me to take a look (no promises on a fix, but I'm curious to see what's going on). Thanks!
Comment 9•11 months ago
|
||
Comment 10•11 months ago
|
||
Comment 11•11 months ago
•
|
||
Looks like our behavior here changed twice.
When this bug was filed, each image forced itself to have a container with the image's intrinsic width (700px).
Then we changed (for the better) in this commit range, I suspect due to bug 1909761:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e8cf043939ae46485e1f683456c399b124b688cd&tochange=7fa1ed101e2409de766a42d4f784acfb45a95fa2
In builds immediately after that^ fix range, there's still blank space between the images, but that space squishes to fit the available space (based on the viewport size). But if your viewport is sufficiently large, then the images reserve 700px of horizontal space.
Then we changed again in this commit range, due to bug 1926015:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a4434b7aabdac9a19413cbeff360c874bb138110&tochange=7df628ab162c87151d7783027905fa7950da76ef
After that point, we match Chrome on the testcase and don't show any space between the images here.
--> Seems to have been fixed by bug 1926015.
Updated•11 months ago
|
Description
•