Skip to content

Commit

Permalink
Post Date: Add spacing support (#43406)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong authored Aug 22, 2022
1 parent 6a31132 commit 3169cf9
Show file tree
Hide file tree
Showing 4 changed files with 10 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 @@ -527,7 +527,7 @@ Add the date of this post. ([Source](https://github.com/WordPress/gutenberg/tree

- **Name:** core/post-date
- **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:** displayType, format, isLink, textAlign

## Post Excerpt
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/post-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
"link": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/post-date/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.wp-block-post-date {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;
}
1 change: 1 addition & 0 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@import "./paragraph/style.scss";
@import "./post-author/style.scss";
@import "./post-comments-form/style.scss";
@import "./post-date/style.scss";
@import "./post-excerpt/style.scss";
@import "./post-featured-image/style.scss";
@import "./post-terms/style.scss";
Expand Down

0 comments on commit 3169cf9

Please sign in to comment.