From 6c98e221a37a6784d1b2fc3c617a5bed6c0627e3 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:38:26 +1000 Subject: [PATCH 1/2] Buttons: Add border, color, and padding block supports --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/buttons/block.json | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 67cebe47fc41bb..1593e5437430e8 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -61,7 +61,7 @@ Prompt visitors to take action with a group of button-style links. ([Source](htt - **Name:** core/buttons - **Category:** design - **Allowed Blocks:** core/button -- **Supports:** align (full, wide), anchor, interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, color (background, button, gradients, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ ## Calendar diff --git a/packages/block-library/src/buttons/block.json b/packages/block-library/src/buttons/block.json index 015290a4c7cc58..e08cb90d97a672 100644 --- a/packages/block-library/src/buttons/block.json +++ b/packages/block-library/src/buttons/block.json @@ -13,8 +13,17 @@ "align": [ "wide", "full" ], "html": false, "__experimentalExposeControlsToChildren": true, + "color": { + "gradients": true, + "button": true, + "text": false, + "__experimentalDefaultControls": { + "background": true + } + }, "spacing": { "blockGap": true, + "padding": true, "margin": [ "top", "bottom" ], "__experimentalDefaultControls": { "blockGap": true @@ -33,6 +42,18 @@ "fontSize": true } }, + "__experimentalBorder": { + "color": true, + "radius": true, + "style": true, + "width": true, + "__experimentalDefaultControls": { + "color": true, + "radius": true, + "style": true, + "width": true + } + }, "layout": { "allowSwitching": false, "allowInheriting": false, From 4879255fac75fa5b1ca1e3dc7a60d06f4bdef335 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:09:48 +1000 Subject: [PATCH 2/2] Remove button element styling --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/buttons/block.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 1593e5437430e8..4106b3d4dafced 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -61,7 +61,7 @@ Prompt visitors to take action with a group of button-style links. ([Source](htt - **Name:** core/buttons - **Category:** design - **Allowed Blocks:** core/button -- **Supports:** align (full, wide), anchor, color (background, button, gradients, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ +- **Supports:** align (full, wide), anchor, color (background, gradients, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~ ## Calendar diff --git a/packages/block-library/src/buttons/block.json b/packages/block-library/src/buttons/block.json index e08cb90d97a672..220f6ef8fd1e27 100644 --- a/packages/block-library/src/buttons/block.json +++ b/packages/block-library/src/buttons/block.json @@ -15,7 +15,6 @@ "__experimentalExposeControlsToChildren": true, "color": { "gradients": true, - "button": true, "text": false, "__experimentalDefaultControls": { "background": true