diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 456300707a659c..b23e5850409bb2 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -365,7 +365,7 @@ Set media and words side-by-side for a richer layout. ([Source](https://github.c - **Name:** core/media-text - **Category:** media -- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ - **Attributes:** align, focalPoint, href, imageFill, isStackedOnMobile, linkClass, linkDestination, linkTarget, mediaAlt, mediaId, mediaLink, mediaPosition, mediaSizeSlug, mediaType, mediaUrl, mediaWidth, rel, verticalAlignment ## Unsupported diff --git a/packages/block-library/src/media-text/block.json b/packages/block-library/src/media-text/block.json index 462b627b78ea72..5feaed68a5db87 100644 --- a/packages/block-library/src/media-text/block.json +++ b/packages/block-library/src/media-text/block.json @@ -98,6 +98,10 @@ "text": true } }, + "spacing": { + "margin": true, + "padding": true + }, "typography": { "fontSize": true, "lineHeight": true, diff --git a/packages/block-library/src/media-text/style.scss b/packages/block-library/src/media-text/style.scss index 4f1b6bd05c5598..e43961ac890973 100644 --- a/packages/block-library/src/media-text/style.scss +++ b/packages/block-library/src/media-text/style.scss @@ -6,6 +6,8 @@ display: grid; grid-template-columns: 50% 1fr; grid-template-rows: auto; + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; &.has-media-on-the-right { grid-template-columns: 1fr 50%;