Skip to content

Commit

Permalink
Add spacing tools to time to read block (#49392)
Browse files Browse the repository at this point in the history
* Add spacing to time to read block

* Add box sizing to the time to read block to ensure padding works correctly
  • Loading branch information
talldan authored Mar 29, 2023
1 parent 0b12f97 commit e2574ba
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 @@ -590,7 +590,7 @@ Show minutes required to finish reading the post. ([Source](https://github.com/W

- **Name:** core/post-time-to-read
- **Category:** theme
- **Supports:** typography (fontSize, lineHeight), ~~html~~
- **Supports:** spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** textAlign

## Post Title
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/post-time-to-read/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
},
"supports": {
"html": false,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/post-time-to-read/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.wp-block-post-time-to-read {
// 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 @@ -32,6 +32,7 @@
@import "./post-featured-image/style.scss";
@import "./post-navigation-link/style.scss";
@import "./post-terms/style.scss";
@import "./post-time-to-read/style.scss";
@import "./post-title/style.scss";
@import "./preformatted/style.scss";
@import "./pullquote/style.scss";
Expand Down

1 comment on commit e2574ba

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in e2574ba.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4550419545
📝 Reported issues:

Please sign in to comment.