Skip to content

Conversation

@jjroelofs
Copy link
Collaborator

Linked issues

Solution

Add a new theme setting to customize the horizontal spacing (padding) between desktop main menu links.

New setting: menu_link_spacing under DXPR Theme Settings > Header > Main Menu Links

  • Type: Range slider
  • Range: 0-50 pixels
  • Default: 10px (matches Bootstrap's nav-link padding)
  • CSS Variable: --dxt-setting-menu-link-spacing

Files changed:

  • features/sooper-header/header-theme-settings.inc - Added form element
  • features/sooper-settings/css-variables-theme-settings-css.inc - Registered CSS variable
  • config/install/dxpr_theme.settings.yml - Added default value
  • dxpr_theme_STARTERKIT/config/install/dxpr_theme_STARTERKIT.settings.yml - Added default value
  • scss/components/dxpr-theme-header--top.scss - Applied CSS variable to nav links

CSS applied to:

.nav > li > a,
.nav > li > span.nav-link {
  padding-left: var(--dxt-setting-menu-link-spacing, 0.625rem);
  padding-right: var(--dxt-setting-menu-link-spacing, 0.625rem);
}

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jjroelofs jjroelofs force-pushed the jur/8.x/756-add-menu-link-spacing-setting branch 3 times, most recently from 3fc063a to 1b8823f Compare January 21, 2026 17:57
Add a new theme setting to customize the horizontal spacing (padding)
between desktop main menu links.

Changes:
- Add 'Link Spacing' range slider in Main Menu Links settings
  (0-50px range, default 10px)
- Register menu_link_spacing as CSS variable with rem suffix
- Apply padding to .nav > li > a and .nav > li > span.nav-link
- Add default values to theme and starterkit config

This allows users to adjust menu link spacing to match their design
requirements, addressing feedback that links are closer together
compared to previous versions.

Fixes #756
@jjroelofs jjroelofs force-pushed the jur/8.x/756-add-menu-link-spacing-setting branch from 1b8823f to 3e85b28 Compare January 21, 2026 18:00
@jjroelofs jjroelofs merged commit 3c25751 into 8.x Jan 21, 2026
3 checks passed
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