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

Fix issues with gallery in IE11. #7465

Merged
merged 1 commit into from
Jun 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core-blocks/gallery/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@
left: 50%;
transform: translate( -50%, -50% );
}

// IE11 doesn't support object-fit or flex very well, so we inline-block.
@media all and ( -ms-high-contrast: none ) {
*::-ms-backdrop, .blocks-gallery-item {
display: inline-block;
}

*::-ms-backdrop, .blocks-gallery-item img {
width: 100%;
}
}
7 changes: 0 additions & 7 deletions core-blocks/gallery/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
justify-content: center;
position: relative;


figure {
margin: 0;
height: 100%;
Expand Down Expand Up @@ -53,12 +52,6 @@
object-fit: cover;

}

// Alas, IE11+ doesn't support object-fit
_:-ms-lang(x), figure {
height: auto;
width: auto;
}
}

// Responsive fallback value, 2 columns
Expand Down