From d803b3ff06e20ac9e8c5702dbf1d93949e6598d8 Mon Sep 17 00:00:00 2001 From: Sunil Prajapati <61308756+akasunil@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:09:09 +0530 Subject: [PATCH] Table of contents: Add border block support (#63578) * Add border support to table of contents block * Add box sizing style to table of contents block Co-authored-by: akasunil Co-authored-by: aaronrobertshaw --- packages/block-library/src/style.scss | 1 + .../src/table-of-contents/block.json | 15 ++++++++++++++- .../src/table-of-contents/style.scss | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 packages/block-library/src/table-of-contents/style.scss diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 790e09535f4b6..5e33980badd76 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -52,6 +52,7 @@ @import "./spacer/style.scss"; @import "./tag-cloud/style.scss"; @import "./table/style.scss"; +@import "./table-of-contents/style.scss"; @import "./term-description/style.scss"; @import "./text-columns/style.scss"; @import "./verse/style.scss"; diff --git a/packages/block-library/src/table-of-contents/block.json b/packages/block-library/src/table-of-contents/block.json index 0c9c4bb4a2868..451d245d867b0 100644 --- a/packages/block-library/src/table-of-contents/block.json +++ b/packages/block-library/src/table-of-contents/block.json @@ -48,7 +48,20 @@ }, "interactivity": { "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } } }, - "example": {} + "example": {}, + "style": "wp-block-table-of-contents" } diff --git a/packages/block-library/src/table-of-contents/style.scss b/packages/block-library/src/table-of-contents/style.scss new file mode 100644 index 0000000000000..4a3fbb6108bee --- /dev/null +++ b/packages/block-library/src/table-of-contents/style.scss @@ -0,0 +1,4 @@ +:root :where(.wp-block-table-of-contents) { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; +}