From 759ab0270a593d44e78d0c57f07208002bf8df96 Mon Sep 17 00:00:00 2001 From: Rinkal Pagdar <92097119+rinkalpagdar@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:32:18 +0530 Subject: [PATCH 1/2] navigation border added --- .../block-library/src/navigation/block.json | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/packages/block-library/src/navigation/block.json b/packages/block-library/src/navigation/block.json index c65e0c6224616e..055d41243137dc 100644 --- a/packages/block-library/src/navigation/block.json +++ b/packages/block-library/src/navigation/block.json @@ -18,7 +18,11 @@ "core/buttons" ], "description": "A collection of blocks that allow visitors to get around your site.", - "keywords": [ "menu", "navigation", "links" ], + "keywords": [ + "menu", + "navigation", + "links" + ], "textdomain": "default", "attributes": { "ref": { @@ -82,8 +86,16 @@ "default": 5 }, "templateLock": { - "type": [ "string", "boolean" ], - "enum": [ "all", "insert", "contentOnly", false ] + "type": [ + "string", + "boolean" + ], + "enum": [ + "all", + "insert", + "contentOnly", + false + ] } }, "providesContext": { @@ -103,7 +115,10 @@ "maxNestingLevel": "maxNestingLevel" }, "supports": { - "align": [ "wide", "full" ], + "align": [ + "wide", + "full" + ], "ariaLabel": true, "html": false, "inserter": true, @@ -116,14 +131,22 @@ "__experimentalFontFamily": true, "__experimentalLetterSpacing": true, "__experimentalTextDecoration": true, - "__experimentalSkipSerialization": [ "textDecoration" ], + "__experimentalSkipSerialization": [ + "textDecoration" + ], "__experimentalDefaultControls": { "fontSize": true } }, "spacing": { "blockGap": true, - "units": [ "px", "em", "rem", "vh", "vw" ], + "units": [ + "px", + "em", + "rem", + "vh", + "vw" + ], "__experimentalDefaultControls": { "blockGap": true } @@ -137,9 +160,21 @@ "type": "flex" } }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } + }, "interactivity": true, "renaming": false }, "editorStyle": "wp-block-navigation-editor", "style": "wp-block-navigation" -} +} \ No newline at end of file From 942300de38afb7630acafd1244bc056d074a4836 Mon Sep 17 00:00:00 2001 From: Rinkal Pagdar <92097119+rinkalpagdar@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:59:44 +0530 Subject: [PATCH 2/2] spacing added to navigation --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/navigation/block.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index dd49d156857249..1691113590f25f 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -472,7 +472,7 @@ A collection of blocks that allow visitors to get around your site. ([Source](ht - **Name:** core/navigation - **Category:** theme - **Allowed Blocks:** core/navigation-link, core/search, core/social-links, core/page-list, core/spacer, core/home-link, core/site-title, core/site-logo, core/navigation-submenu, core/loginout, core/buttons -- **Supports:** align (full, wide), ariaLabel, inserter, interactivity, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, units), typography (fontSize, lineHeight), ~~html~~, ~~renaming~~ +- **Supports:** align (full, wide), ariaLabel, inserter, interactivity, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, margin, padding, units), typography (fontSize, lineHeight), ~~html~~, ~~renaming~~ - **Attributes:** __unstableLocation, backgroundColor, customBackgroundColor, customOverlayBackgroundColor, customOverlayTextColor, customTextColor, hasIcon, icon, maxNestingLevel, openSubmenusOnClick, overlayBackgroundColor, overlayMenu, overlayTextColor, ref, rgbBackgroundColor, rgbTextColor, showSubmenuIcon, templateLock, textColor ## Custom Link diff --git a/packages/block-library/src/navigation/block.json b/packages/block-library/src/navigation/block.json index 055d41243137dc..39936a0ae05a61 100644 --- a/packages/block-library/src/navigation/block.json +++ b/packages/block-library/src/navigation/block.json @@ -139,6 +139,8 @@ } }, "spacing": { + "margin": true, + "padding": true, "blockGap": true, "units": [ "px",