diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index d6332d1543e8f1..8667c9b9cfcaf1 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -266,7 +266,7 @@ Add a link to a downloadable file. ([Source](https://github.com/WordPress/gutenb - **Name:** core/file - **Category:** media -- **Supports:** align, anchor, color (background, gradients, link, ~~text~~) +- **Supports:** align, anchor, color (background, gradients, link, ~~text~~), spacing (margin, padding) - **Attributes:** displayPreview, downloadButtonText, fileId, fileName, href, id, previewHeight, showDownloadButton, textLinkHref, textLinkTarget ## Footnotes diff --git a/packages/block-library/src/file/block.json b/packages/block-library/src/file/block.json index 12edc20630d1ed..576fe34f5cf8f7 100644 --- a/packages/block-library/src/file/block.json +++ b/packages/block-library/src/file/block.json @@ -57,6 +57,10 @@ "supports": { "anchor": true, "align": true, + "spacing": { + "margin": true, + "padding": true + }, "color": { "gradients": true, "link": true, diff --git a/packages/block-library/src/file/style.scss b/packages/block-library/src/file/style.scss index e34935833e13cd..5c9a2f7be2adc6 100644 --- a/packages/block-library/src/file/style.scss +++ b/packages/block-library/src/file/style.scss @@ -1,4 +1,7 @@ .wp-block-file { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; + &:not(.wp-element-button) { font-size: 0.8em; }