diff --git a/packages/block-library/src/gallery/style.scss b/packages/block-library/src/gallery/style.scss index 26053298a3b3b..a62465bb4f225 100644 --- a/packages/block-library/src/gallery/style.scss +++ b/packages/block-library/src/gallery/style.scss @@ -101,6 +101,13 @@ &.columns-#{ $i } .blocks-gallery-item { width: calc((100% - #{ $grid-size-large } * #{ $i - 1 }) / #{ $i }); margin-right: 16px; + + // Rules inside this query are only run by Microsoft Edge. + // Edge miscalculates `calc`, so we have to add some buffer. + // See also https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15637241/ + @supports (-ms-ime-align:auto) { + width: calc((100% - #{ $grid-size-large } * #{ $i - 1 }) / #{ $i } - 1px); + } } }