Skip to content

Add configurable link separators with responsive visibility controls for Navigation including page list items#77464

Open
sarthaknagoshe2002 wants to merge 3 commits intoWordPress:trunkfrom
sarthaknagoshe2002:fix/issue-75201
Open

Add configurable link separators with responsive visibility controls for Navigation including page list items#77464
sarthaknagoshe2002 wants to merge 3 commits intoWordPress:trunkfrom
sarthaknagoshe2002:fix/issue-75201

Conversation

@sarthaknagoshe2002
Copy link
Copy Markdown
Contributor

What?

Closes #75201

Adds support for configurable link separators in the Navigation block, along with options to control their visibility across devices.

Why?

Designers often need separators between navigation links for better readability and visual structure, especially in horizontal menus and footers. Currently, this requires custom CSS, which is not user-friendly or consistent across themes. This PR introduces a built-in solution that works out of the box and adapts to responsive layouts.

How?

  • Introduced new block attributes for separator type and visibility settings
  • Extended block wrapper classes and inline styles to pass separator configuration
  • Implemented logic to convert spacing presets into CSS variables for accurate separator alignment when the block spacing is changed.
  • Used CSS pseudo-elements to render separators and position them precisely between items using the computed gap
  • Ensured compatibility with both Navigation items and Page List items

Testing Instructions

  1. Open a post or page
  2. Insert a Navigation block
  3. Add multiple Navigation Link items or use a Page List block inside it
  4. Open the block settings in the sidebar
  5. Select a separator style (e.g. dot, pipe, dash, etc.)
  6. Change the “Show on” option (Desktop only / Desktop + Tablet / All)
  7. Adjust the block spacing from the Dimensions panel
  8. Verify that:
    1. Separators appear between items
    2. Separators stay centered regardless of spacing changes
    3. Visibility settings correctly hide/show separators on different screen sizes
  9. Preview the page and verify the same behavior on the frontend

Screenshots or screencast

Navigation.Separator.mov

Use of AI Tools

Used AI assistance to help refine code and for documentation.

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: henriqueiamarino <iamarinoh@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Apr 17, 2026
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Navigation Affects the Navigation Block labels Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Navigation Affects the Navigation Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation / Page List: add configurable link separators (desktop-only option)

2 participants