From f76ea751bbe64b82d10e4bca53a5891ebe822988 Mon Sep 17 00:00:00 2001 From: akasunil Date: Sun, 21 Jul 2024 22:16:19 +0530 Subject: [PATCH 1/5] Add border, color, and spacing support in social icon --- .../block-library/src/social-link/block.json | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/block-library/src/social-link/block.json b/packages/block-library/src/social-link/block.json index 37e8376f22ff09..625d5c7a822323 100644 --- a/packages/block-library/src/social-link/block.json +++ b/packages/block-library/src/social-link/block.json @@ -34,6 +34,33 @@ "html": false, "interactivity": { "clientNavigation": true + }, + "spacing": { + "margin": true, + "padding": true, + "units": [ "px", "em", "rem", "vh", "vw" ], + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } + }, + "color": { + "background": true, + "text": true, + "gradients": true, + "link": false + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } } }, "editorStyle": "wp-block-social-link-editor" From 0d025ceab48c9836f88f32db7f80a916af38dafb Mon Sep 17 00:00:00 2001 From: akasunil Date: Sun, 21 Jul 2024 22:16:31 +0530 Subject: [PATCH 2/5] update developer docs --- docs/reference-guides/core-blocks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 0b6e6aa3fd6769..472823a96254c4 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -865,7 +865,7 @@ Display an icon linking to a social profile or site. ([Source](https://github.co - **Name:** core/social-link - **Category:** widgets - **Parent:** core/social-links -- **Supports:** interactivity (clientNavigation), ~~html~~, ~~reusable~~ +- **Supports:** color (background, gradients, text, ~~link~~), interactivity (clientNavigation), spacing (margin, padding, units), ~~html~~, ~~reusable~~ - **Attributes:** label, rel, service, url ## Social Icons From 789b27bea792f77fed914805b5ff472b95f828ae Mon Sep 17 00:00:00 2001 From: akasunil Date: Sat, 10 Aug 2024 14:51:04 +0530 Subject: [PATCH 3/5] Remove spacing styles from social links block --- packages/block-library/src/social-links/style.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 955c0434feea22..f1095cb5a4673c 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -91,8 +91,6 @@ // This needs specificity because themes usually override it with things like .widget-area a. .wp-block-social-links .wp-block-social-link.wp-social-link { display: inline-block; - margin: 0; - padding: 0; .wp-block-social-link-anchor { &, From b252dd1491a7de7bbf5ab8cf486537104e7fb478 Mon Sep 17 00:00:00 2001 From: akasunil Date: Tue, 13 Aug 2024 22:21:24 +0530 Subject: [PATCH 4/5] Skip color support for social link block --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/social-link/block.json | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index a09d5956945d96..d12137e2e868e4 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -865,7 +865,7 @@ Display an icon linking to a social profile or site. ([Source](https://github.co - **Name:** core/social-link - **Category:** widgets - **Parent:** core/social-links -- **Supports:** color (background, gradients, text, ~~link~~), interactivity (clientNavigation), spacing (margin, padding, units), ~~html~~, ~~reusable~~ +- **Supports:** interactivity (clientNavigation), spacing (margin, padding, units), ~~html~~, ~~reusable~~ - **Attributes:** label, rel, service, url ## Social Icons diff --git a/packages/block-library/src/social-link/block.json b/packages/block-library/src/social-link/block.json index 625d5c7a822323..5406eb8f725a69 100644 --- a/packages/block-library/src/social-link/block.json +++ b/packages/block-library/src/social-link/block.json @@ -44,12 +44,6 @@ "padding": false } }, - "color": { - "background": true, - "text": true, - "gradients": true, - "link": false - }, "__experimentalBorder": { "radius": true, "color": true, From c6aa0b3c7524578f8d2f4e5b15ec3a623618fd45 Mon Sep 17 00:00:00 2001 From: akasunil Date: Mon, 26 Aug 2024 16:40:32 +0530 Subject: [PATCH 5/5] Make border support optional --- packages/block-library/src/social-link/block.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/block-library/src/social-link/block.json b/packages/block-library/src/social-link/block.json index 5406eb8f725a69..d7e4ae9e191db7 100644 --- a/packages/block-library/src/social-link/block.json +++ b/packages/block-library/src/social-link/block.json @@ -38,7 +38,6 @@ "spacing": { "margin": true, "padding": true, - "units": [ "px", "em", "rem", "vh", "vw" ], "__experimentalDefaultControls": { "margin": false, "padding": false @@ -48,13 +47,7 @@ "radius": true, "color": true, "width": true, - "style": true, - "__experimentalDefaultControls": { - "radius": true, - "color": true, - "width": true, - "style": true - } + "style": true } }, "editorStyle": "wp-block-social-link-editor"