Skip to content

Commit

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

* Added box-sizing styles and removed unused editor stylesheet declaration.
  • Loading branch information
ndiego authored Aug 23, 2022
1 parent f695d8c commit cb3130b
Show file tree
Hide file tree
Showing 4 changed files with 9 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 @@ -662,7 +662,7 @@ Display the query title. ([Source](https://github.com/WordPress/gutenberg/tree/t

- **Name:** core/query-title
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, text), spacing (margin), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), color (background, gradients, text), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** level, showPrefix, showSearchTerm, textAlign, type

## Quote
Expand Down
5 changes: 3 additions & 2 deletions packages/block-library/src/query-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
}
},
"spacing": {
"margin": true
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
Expand All @@ -54,5 +55,5 @@
}
}
},
"editorStyle": "wp-block-query-title-editor"
"style": "wp-block-query-title"
}
4 changes: 4 additions & 0 deletions packages/block-library/src/query-title/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.wp-block-query-title {
// 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 @@ -36,6 +36,7 @@
@import "./pullquote/style.scss";
@import "./post-template/style.scss";
@import "./query-pagination/style.scss";
@import "./query-title/style.scss";
@import "./quote/style.scss";
@import "./read-more/style.scss";
@import "./rss/style.scss";
Expand Down

0 comments on commit cb3130b

Please sign in to comment.