Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codepen.io - design is broken #17152

Closed
webcompat-bot opened this issue Jun 5, 2018 · 12 comments
Closed

codepen.io - design is broken #17152

webcompat-bot opened this issue Jun 5, 2018 · 12 comments
Labels
browser-firefox priority-important severity-critical The site or core functionality is unusable, or you would probably open another browser to use it.
Milestone

Comments

@webcompat-bot
Copy link

URL: https://codepen.io/joeKingtheThird/pen/jKqYKX

Browser / Version: chrome Version 67.0.3396.62
Operating System: Windows 7
Tested Another Browser: Yes

Problem type: Design is broken
Description: Image in grid object-fit or grid-gap is incorrect in Chrome browser.
Steps to Reproduce:

Screenshot Description

From webcompat.com with ❤️

@softvision-oana-arbuzov
Copy link
Member

Thanks for the report I was able to reproduce the issue.
screenshot_2

Tested with:
Browser / Version: Chrome 67.0.3396.62
Operating System: Windows 10 Pro

Moving to Needsdiagnosis for further investigation.

@karlcow
Copy link
Member

karlcow commented Jun 5, 2018

@foolip do you have an idea about this? It's about the implementations of grid in Chrome.

@joeKingtheThird
Copy link

joeKingtheThird commented Jun 6, 2018

If I take off auto-rows line then it seems to be the same as firefox (gif from chrome browser codepen)
https://codepen.io/joeKingtheThird/pen/pKbpPZ

css-grid-fluid-test-gap-chrome-noautorows

@joeKingtheThird
Copy link

I've put some borders on the items in the grid. On auto-rows 200px 150px Chrome looks different to firefox. Maybe firefox does the auto-rows wrong. https://codepen.io/joeKingtheThird/pen/VdKrdq
That also has overflow:hidden on the item which helps the Chrome browser. Chrome browser seems to need overflow:hidden on this responsive image.

@joeKingtheThird
Copy link

This is the no overflow:hidden view with borders on items in grid in Chrome. Notice the images go outside the item borders - overflow:hidden on items corrects this.
chrome-fluid-test-borders-200-1

@foolip
Copy link
Member

foolip commented Jun 7, 2018

Is there a static example that shows the difference between browsers? What is the result of the example in Chrome, Edge, Firefox and Safari?

@joeKingtheThird
Copy link

joeKingtheThird commented Jun 7, 2018

Test code https://codepen.io/joeKingtheThird/pen/ZRBzEw

snap9163
snap9162
This code has grid-auto-rows:200px 100px;
Firefox seems to not do the auto-rows and seems to enlarge/cover the image in the item strangely.
We have object-fit:cover; Firefox should be enlarging the image and clipping the image to fit the box/item? It looks like it just contains the image with no clipping.

update:9jun2018
Aha! Seems like the actual site codepen.io is inserting some sort of space underneath the 200x200px image. jsfiddle does this also -https://jsfiddle.net/0qbj6t34/ chrome and firefox both have space under image.

This file shows the correct no space under image - div wraps with no space
http://plnkr.co/edit/aUxXKvLLaR4nPX4jO4Uy?p=preview

@softvision-oana-arbuzov
Copy link
Member

I've attached a screenshot with the layout on all browser.
diffbrowsers

@joeKingtheThird
Copy link

Small summary: Firefox doesn't seem to respect grid-auto-rows in this example
http://plnkr.co/edit/5uW1sXkFHelbe9qZhfOx?p=preview
Chrome seems to not crop the overflow
http://plnkr.co/edit/wDlGJ6mjsDUI3OqZDO4x?p=preview

@alijuma
Copy link

alijuma commented Aug 10, 2018

Firefox doesn't handle grid-auto-rows with multiple values: https://bugzilla.mozilla.org/show_bug.cgi?id=1392734. This is also covered by a WPT that only Firefox fails.

I'm not sure if the lack of overflow cropping issue is really a bug. For the two-argument grid-auto-rows example, Chrome / Safari / Edge don't crop the overflow. And once we switch to a one-argument version of grid-auto-rows, even Firefox doesn't crop the overflow:
http://plnkr.co/edit/Iu5WeY9CDkUUouBI1LdF?p=preview

@foolip
Copy link
Member

foolip commented Sep 14, 2018

@alijuma thanks for digging into this. I'll change the browser label to Firefox since they are the outlier.

@miketaylr miketaylr added the severity-critical The site or core functionality is unusable, or you would probably open another browser to use it. label Nov 29, 2018
@miketaylr
Copy link
Member

(i'm going to close this as a dupe of https://bugzilla.mozilla.org/show_bug.cgi?id=1392734, thanks all!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox priority-important severity-critical The site or core functionality is unusable, or you would probably open another browser to use it.
Projects
None yet
Development

No branches or pull requests

7 participants