Skip to content

Commit

Permalink
Post Terms: Add spacing support (#43646)
Browse files Browse the repository at this point in the history
* Adding padding support to the Post Terms block.

* Add styles to the correct selector.
  • Loading branch information
ndiego authored Sep 28, 2022
1 parent cc18f73 commit 94565f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ Post terms. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages

- **Name:** core/post-terms
- **Category:** theme
- **Supports:** color (background, gradients, link, text), typography (fontSize, lineHeight), ~~html~~
- **Supports:** color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** prefix, separator, suffix, term, textAlign

## Post Title
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/post-terms/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
9 changes: 7 additions & 2 deletions packages/block-library/src/post-terms/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.wp-block-post-terms__separator {
white-space: pre-wrap;
.wp-block-post-terms {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

.wp-block-post-terms__separator {
white-space: pre-wrap;
}
}

0 comments on commit 94565f6

Please sign in to comment.