Skip to content

Conversation

@jasperf
Copy link
Contributor

@jasperf jasperf commented Jan 20, 2026

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:

  • Added new "Dropdown Spacing" control panel in the navigation block inspector with ToggleControl and SelectControl components for enabling/disabling spacing and selecting preset values
  • Implemented client-side attribute management in navigation.js using WordPress hooks API (addFilter) to register navDropdownSpacing and navEnableDropdownSpacing attributes
  • Created server-side rendering logic in inc/block-extensions.php to filter render_block output and inject CSS custom properties (--nav-dropdown-spacing) into navigation block markup
  • Added accompanying CSS rules in assets/styles/core-navigation.css to apply spacing using gap property on .wp-block-navigation__submenu-container elements

Version and Documentation Updates:

  • Bumped theme version to 2.3.0 across style.css, readme.txt, and CHANGELOG.md following WordPress theme versioning standards
  • Documented the new feature in changelog with technical implementation details and usage guidance for theme developers

Files Changed:

@jasperf jasperf merged commit 999d599 into main Jan 20, 2026
2 checks passed
@jasperf jasperf deleted the nav-dropdown-spacing-setting branch January 20, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants