diff --git a/edit-post/assets/stylesheets/_mixins.scss b/edit-post/assets/stylesheets/_mixins.scss index 7b011093cf632..4695232b15946 100644 --- a/edit-post/assets/stylesheets/_mixins.scss +++ b/edit-post/assets/stylesheets/_mixins.scss @@ -295,6 +295,7 @@ @mixin caption-style() { margin-top: 0.5em; + margin-bottom: 1em; color: $dark-gray-300; text-align: center; font-size: $default-font-size; diff --git a/packages/block-library/src/image/style.scss b/packages/block-library/src/image/style.scss index e825f126759dc..82754b506b623 100644 --- a/packages/block-library/src/image/style.scss +++ b/packages/block-library/src/image/style.scss @@ -20,7 +20,11 @@ .aligncenter, &.is-resized { display: table; - margin: 0; + + // The figure is born with left and right margin. + // We remove this by default, and then customize it for left, right, and center. + margin-left: 0; + margin-right: 0; > figcaption { display: table-caption; @@ -38,9 +42,9 @@ margin-left: 1em; } - // Centered images. .aligncenter { - margin: 0 auto; + margin-left: auto; + margin-right: auto; } // Supply caption styles to images, even if the theme hasn't opted in.