-
Notifications
You must be signed in to change notification settings - Fork 615
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
Fix tall images on PDPs and PLPs #1559
Conversation
Autotagging @bigcommerce/storefront-team @davidchin |
Looks like this doesn't work on IE11. Need to look for a better solution. |
92c3038
to
3fd8aef
Compare
@mattolson ♻️ |
3fd8aef
to
dad4fde
Compare
I've added this polyfill for IE11: https://github.com/fregante/object-fit-images We can remove it when we no longer need to support IE11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much does this add to the page weight? Is it possible to optimize this so the polyfill is only downloaded and loaded for IE11 users?
It's 3kb before gzip: https://github.com/fregante/object-fit-images/blob/master/dist/ofi.min.js |
@mattolson I've added a conditional to make it only execute for IE11. Let me know if you think we should further optimize. |
6758ca7
to
dad4fde
Compare
What?
Cornerstone 4.0 introduced a bug in which images which are particularly tall (portrait) are stretched on PDPs and PLPs:
This fixes that using
object-fit: contain
.Tickets / Documentation
Screenshots (if appropriate)