Skip to content

Commit

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

* Add border-box style.
  • Loading branch information
ndiego committed Aug 23, 2022
1 parent cb3130b commit 7a19f69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 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 @@ -581,7 +581,7 @@ Displays the title of a post, page, or any other content-type. ([Source](https:/

- **Name:** core/post-title
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, link, text), spacing (margin), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** isLink, level, linkTarget, rel, textAlign

## Preformatted
Expand Down
3 changes: 2 additions & 1 deletion packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
}
},
"spacing": {
"margin": true
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/post-title/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.wp-block-post-title {
word-break: break-word;
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

a {
display: inline-block;
Expand Down

0 comments on commit 7a19f69

Please sign in to comment.