diff --git a/packages/block-library/src/cover/style.scss b/packages/block-library/src/cover/style.scss index 806ed02fb2dc9..a9223bfb30c2f 100644 --- a/packages/block-library/src/cover/style.scss +++ b/packages/block-library/src/cover/style.scss @@ -96,6 +96,20 @@ width: 100%; } + // Using flexbox without an assigned height property breaks vertical center alignment in IE11. + // Appending an empty ::after element tricks IE11 into giving the cover image an implicit height, which sidesteps this issue. + &::after { + display: block; + content: ""; + font-size: 0; + min-height: inherit; + + // IE doesn't support flex so omit that. + @supports (position: sticky) { + content: none; + } + } + // Aligned cover blocks should not use our global alignment rules &.aligncenter, &.alignleft,