Navigation Dropdown Spacing Setting #45
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This release adds granular control over navigation dropdown spacing through a new block extension setting. The Navigation Dropdown Spacing Setting allows users to configure the gap between dropdown menu items using WordPress's semantic spacing presets (small, medium, large, x-large, xx-large) or disable spacing entirely, addressing a common customization need for professional business sites. This enhancement builds upon the existing navigation block extensions (Clickable Parents and Improved Chevrons) and follows WordPress block theme best practices for inspector controls and attribute management.
Navigation Block Enhancement:
navigation.jsusing WordPress hooks API (addFilter) to registernavDropdownSpacingandnavEnableDropdownSpacingattributesinc/block-extensions.phpto filterrender_blockoutput and inject CSS custom properties (--nav-dropdown-spacing) into navigation block markupassets/styles/core-navigation.cssto apply spacing usinggapproperty on.wp-block-navigation__submenu-containerelementsVersion and Documentation Updates:
style.css,readme.txt, andCHANGELOG.mdfollowing WordPress theme versioning standardsFiles Changed:
CHANGELOG.md(Modified)assets/js/block-extensions/navigation.js(Modified)assets/styles/core-navigation.css(Modified)inc/block-extensions.php(Modified)readme.txt(Modified)style.css(Modified)