Skip to content

Commit

Permalink
File block: Add spacing support (#45107)
Browse files Browse the repository at this point in the history
* File block: Add spacing support
  • Loading branch information
carolinan authored Aug 4, 2023
1 parent 9dfe094 commit 339cf1a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/file/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
"supports": {
"anchor": true,
"align": true,
"spacing": {
"margin": true,
"padding": true
},
"color": {
"gradients": true,
"link": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/file/style.scss
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down

0 comments on commit 339cf1a

Please sign in to comment.