From cb3130bcd4e285efaa749fb3d92429268cf4c10d Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Mon, 22 Aug 2022 19:55:05 -0500 Subject: [PATCH] Query Title: Add padding support (#43458) * Adding padding support to the Query Title block. * Added box-sizing styles and removed unused editor stylesheet declaration. --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/query-title/block.json | 5 +++-- packages/block-library/src/query-title/style.scss | 4 ++++ packages/block-library/src/style.scss | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 packages/block-library/src/query-title/style.scss diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 456300707a659c..e4840df71bea39 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -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 diff --git a/packages/block-library/src/query-title/block.json b/packages/block-library/src/query-title/block.json index 5b5907b3a7b9c3..318643bae30058 100644 --- a/packages/block-library/src/query-title/block.json +++ b/packages/block-library/src/query-title/block.json @@ -37,7 +37,8 @@ } }, "spacing": { - "margin": true + "margin": true, + "padding": true }, "typography": { "fontSize": true, @@ -54,5 +55,5 @@ } } }, - "editorStyle": "wp-block-query-title-editor" + "style": "wp-block-query-title" } diff --git a/packages/block-library/src/query-title/style.scss b/packages/block-library/src/query-title/style.scss new file mode 100644 index 00000000000000..d4a3236cdfff9a --- /dev/null +++ b/packages/block-library/src/query-title/style.scss @@ -0,0 +1,4 @@ +.wp-block-query-title { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; +} diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 1b63505027084e..81ffa1784ff0aa 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -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";