diff --git a/packages/block-library/src/gallery/style.scss b/packages/block-library/src/gallery/style.scss index dc2b2213722b22..a43d08046bb5e4 100644 --- a/packages/block-library/src/gallery/style.scss +++ b/packages/block-library/src/gallery/style.scss @@ -133,8 +133,6 @@ } // Apply max-width to floated items that have no intrinsic width. - [data-align="left"] &, - [data-align="right"] &, &.alignleft, &.alignright { max-width: $content-width / 2; @@ -148,4 +146,11 @@ &.alignright { display: flex; } + + // If the gallery is centered, center the content inside as well. + &.aligncenter { + .blocks-gallery-item figure { + justify-content: center; + } + } }