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

IE11: gallery images stretched vertically #5504

Closed
afercia opened this issue Mar 8, 2018 · 5 comments
Closed

IE11: gallery images stretched vertically #5504

afercia opened this issue Mar 8, 2018 · 5 comments
Labels
[Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Mar 8, 2018

This is how the gallery images appear on Internet Explorer 11 and Gutenberg current master:

screenshot 48

@afercia afercia added the [Type] Bug An existing feature does not function as intended label Mar 8, 2018
@khleomix
Copy link

khleomix commented Mar 8, 2018

@afercia I can duplicate this issue and would love to work on this.

@jeffpaul
Copy link
Member

This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs.

@jorgefilipecosta
Copy link
Member

It seems beside flex problems IE11 also does not support object-fit CSS property used in the gallery. There are some polyfills available but I'm not certain if adding a polyfill in the front end is something we should do.

@opicron
Copy link

opicron commented May 21, 2018

I had the same issue, an temporary fix is rather simple:

.blocks-gallery-item figure {
  flex-shrink: 0;
}

.wp-block-gallery .blocks-gallery-item {
  flex-grow: 0 !important;
}

Source:
https://msdn.microsoft.com/en-us/library/jj127297%28v=vs.85%29.aspx
https://msdn.microsoft.com/en-us//library/hh772069%28v=vs.85%29.aspx

Stackoverflow (accepted answer):
https://stackoverflow.com/questions/36822370/flexbox-on-ie11-image-stretched-for-no-reason

PS:

I had to adjust the calculation of rows by 1 (17 instead of 16) pixel for IE11 in my setup. Else the rows would collapse on before the third image.

@media (min-width:600px){
  .wp-block-gallery.columns-3 .blocks-gallery-image,.wp-block-gallery.columns-3 .blocks-gallery-item{
    width:calc(100% / 3 - 17px)
  }
}

@mtias
Copy link
Member

mtias commented Jul 9, 2018

This should be addressed with #7465

@mtias mtias closed this as completed Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

6 participants