From b48c0dbd3ec742142678222c05ede3aa077fc762 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 11 Jul 2024 08:13:02 +0200 Subject: [PATCH 1/5] Archives: Add border block support --- packages/block-library/src/archives/block.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/block-library/src/archives/block.json b/packages/block-library/src/archives/block.json index e36691f3143c22..3290a9c42a5657 100644 --- a/packages/block-library/src/archives/block.json +++ b/packages/block-library/src/archives/block.json @@ -26,6 +26,16 @@ }, "supports": { "align": true, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true + } + }, "html": false, "spacing": { "margin": true, From fa75b2292610a8a2f6ba8ba952f322d49d33b604 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 11 Jul 2024 08:22:34 +0200 Subject: [PATCH 2/5] Remove the browser default margin on the UL --- packages/block-library/src/archives/editor.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-library/src/archives/editor.scss b/packages/block-library/src/archives/editor.scss index 6bb1d96431acf7..3e88dae1e47637 100644 --- a/packages/block-library/src/archives/editor.scss +++ b/packages/block-library/src/archives/editor.scss @@ -1,3 +1,4 @@ ul.wp-block-archives { + margin: 0; padding-left: 2.5em; } From e61610bc2000ecd50ff73c4980cb341b575307cb Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Tue, 30 Jul 2024 07:45:34 +0200 Subject: [PATCH 3/5] Remove duplicate spacing and borders --- packages/block-library/src/archives/editor.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/archives/editor.scss b/packages/block-library/src/archives/editor.scss index 3e88dae1e47637..eb657b595f7141 100644 --- a/packages/block-library/src/archives/editor.scss +++ b/packages/block-library/src/archives/editor.scss @@ -1,4 +1,11 @@ ul.wp-block-archives { - margin: 0; padding-left: 2.5em; } + +// The following styles are to prevent duplicate spacing and borders for the archives +// block in the editor given it uses server side rendering. +// See https://github.com/WordPress/gutenberg/pull/63400 +.wp-block-archives .wp-block-archives { + margin: 0; + border: 0; +} From 1073cf21b74702b1956b044fcf4f1ec825a06e6d Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Tue, 30 Jul 2024 07:45:59 +0200 Subject: [PATCH 4/5] Make the border controls optional in the block editor --- packages/block-library/src/archives/block.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/archives/block.json b/packages/block-library/src/archives/block.json index 3290a9c42a5657..ca14371b59214b 100644 --- a/packages/block-library/src/archives/block.json +++ b/packages/block-library/src/archives/block.json @@ -32,8 +32,10 @@ "width": true, "style": true, "__experimentalDefaultControls": { - "color": true, - "radius": true + "radius": false, + "color": false, + "width": false, + "style": false } }, "html": false, From 7ee5cc0be7e52edcf397b827d9d35f236280d8db Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Wed, 31 Jul 2024 04:34:41 +0200 Subject: [PATCH 5/5] Remove experimental default controls --- packages/block-library/src/archives/block.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/block-library/src/archives/block.json b/packages/block-library/src/archives/block.json index ca14371b59214b..7fe956a994ed5a 100644 --- a/packages/block-library/src/archives/block.json +++ b/packages/block-library/src/archives/block.json @@ -30,13 +30,7 @@ "radius": true, "color": true, "width": true, - "style": true, - "__experimentalDefaultControls": { - "radius": false, - "color": false, - "width": false, - "style": false - } + "style": true }, "html": false, "spacing": {