From ad9708d505032ebd52f5859ce0ab15d593edcb5b Mon Sep 17 00:00:00 2001 From: Sunil Prajapati <61308756+akasunil@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:59:25 +0530 Subject: [PATCH] Post Excerpt: Add border block support (#64022) * Add border support to post excerpt block * add box sizing style to excerpt block Co-authored-by: akasunil Co-authored-by: aaronrobertshaw --- packages/block-library/src/post-excerpt/block.json | 12 ++++++++++++ packages/block-library/src/post-excerpt/style.scss | 3 +++ 2 files changed, 15 insertions(+) diff --git a/packages/block-library/src/post-excerpt/block.json b/packages/block-library/src/post-excerpt/block.json index 9809d10ab426b..61888ced43e67 100644 --- a/packages/block-library/src/post-excerpt/block.json +++ b/packages/block-library/src/post-excerpt/block.json @@ -56,6 +56,18 @@ }, "interactivity": { "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } } }, "editorStyle": "wp-block-post-excerpt-editor", diff --git a/packages/block-library/src/post-excerpt/style.scss b/packages/block-library/src/post-excerpt/style.scss index 1562bca962c1c..b44108f67b5dd 100644 --- a/packages/block-library/src/post-excerpt/style.scss +++ b/packages/block-library/src/post-excerpt/style.scss @@ -1,5 +1,8 @@ // Lowest specificity on wrapper margins to avoid overriding layout styles. :where(.wp-block-post-excerpt) { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; + margin-top: var(--wp--style--block-gap); margin-bottom: var(--wp--style--block-gap); }