From 448ccbcea350940808fc7fd8275f75e4bb3681b5 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Tue, 6 Aug 2024 23:16:48 +0530 Subject: [PATCH 1/2] Comment Pagination Next: Add Border Support --- docs/reference-guides/core-blocks.md | 2 +- .../src/comments-pagination-next/block.json | 19 ++++++++++++++++++- .../src/comments-pagination-next/style.scss | 4 ++++ packages/block-library/src/style.scss | 1 + 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 packages/block-library/src/comments-pagination-next/style.scss diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 72281a53c3dd1..e526cbb4e710c 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -207,7 +207,7 @@ Displays the next comment's page link. ([Source](https://github.com/WordPress/gu - **Name:** core/comments-pagination-next - **Category:** theme - **Parent:** core/comments-pagination -- **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** label ## Comments Page Numbers diff --git a/packages/block-library/src/comments-pagination-next/block.json b/packages/block-library/src/comments-pagination-next/block.json index 22e20bfa8dbf2..485a535c8bcb0 100644 --- a/packages/block-library/src/comments-pagination-next/block.json +++ b/packages/block-library/src/comments-pagination-next/block.json @@ -38,6 +38,23 @@ }, "interactivity": { "clientNavigation": true + }, + "spacing": { + "margin": true, + "padding": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } } - } + }, + "style": "wp-block-comments-pagination-next" } diff --git a/packages/block-library/src/comments-pagination-next/style.scss b/packages/block-library/src/comments-pagination-next/style.scss new file mode 100644 index 0000000000000..264d0ad608bc0 --- /dev/null +++ b/packages/block-library/src/comments-pagination-next/style.scss @@ -0,0 +1,4 @@ +.wp-block-comments-pagination-next { + // 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 8f17cd7a50f55..74de86e228660 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -61,5 +61,6 @@ @import "./verse/style.scss"; @import "./video/style.scss"; @import "./footnotes/style.scss"; +@import "./comments-pagination-next/style.scss"; @import "common.scss"; From 158b9b6e57b5deefb309db911c2732e6c165aaa5 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Thu, 8 Aug 2024 21:40:42 +0530 Subject: [PATCH 2/2] Added suggested changes --- .../src/comments-pagination-next/block.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/comments-pagination-next/block.json b/packages/block-library/src/comments-pagination-next/block.json index 485a535c8bcb0..cd35631fc2ae0 100644 --- a/packages/block-library/src/comments-pagination-next/block.json +++ b/packages/block-library/src/comments-pagination-next/block.json @@ -41,19 +41,17 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "__experimentalBorder": { "radius": true, "color": true, "width": true, - "style": true, - "__experimentalDefaultControls": { - "radius": true, - "color": true, - "width": true, - "style": true - } + "style": true } }, "style": "wp-block-comments-pagination-next"