Summary
The navbar renders a vertical separator (NavMenuDivider) unconditionally inside the rp-nav__others container, even when no items (social links, dark/light toggle, language switcher, version switcher) are visible to its right.
Current behavior
In the upstream Rspress Nav component (@rspress/core — eject-theme/components/Nav/index.tsx:49-55), the divider is always rendered:
<div className="rp-nav__others">
<NavMenuDivider />
<NavLangs />
<NavVersions />
{hasAppearanceSwitch && <SwitchAppearance />}
<SocialLinks />
</div>
When a zpress consumer disables social links, dark mode, langs, and versions, the .rp-nav-menu__divider 1px vertical line still appears with nothing beside it.
Expected behavior
The divider should not be visible when there are no sibling elements rendering content to its right.
Location
@rspress/core eject-theme/components/Nav/index.tsx ~line 50 — unconditional <NavMenuDivider />
@rspress/core eject-theme/components/Nav/NavMenu.css ~line 69 — .rp-nav-menu__divider styles
packages/ui/src/theme/components/nav/layout.tsx — zpress Layout wrapper
Proposed approach
Override via CSS in the zpress theme: use :has() to hide .rp-nav-menu__divider when it is the only visible child of .rp-nav__others, e.g.:
.rp-nav__others:not(:has(.rp-nav-menu__divider ~ *:not(:empty))) .rp-nav-menu__divider {
display: none;
}
Or eject/override the Nav component to conditionally render the divider.
Summary
The navbar renders a vertical separator (
NavMenuDivider) unconditionally inside therp-nav__otherscontainer, even when no items (social links, dark/light toggle, language switcher, version switcher) are visible to its right.Current behavior
In the upstream Rspress
Navcomponent (@rspress/core—eject-theme/components/Nav/index.tsx:49-55), the divider is always rendered:When a zpress consumer disables social links, dark mode, langs, and versions, the
.rp-nav-menu__divider1px vertical line still appears with nothing beside it.Expected behavior
The divider should not be visible when there are no sibling elements rendering content to its right.
Location
@rspress/coreeject-theme/components/Nav/index.tsx~line 50 — unconditional<NavMenuDivider />@rspress/coreeject-theme/components/Nav/NavMenu.css~line 69 —.rp-nav-menu__dividerstylespackages/ui/src/theme/components/nav/layout.tsx— zpress Layout wrapperProposed approach
Override via CSS in the zpress theme: use
:has()to hide.rp-nav-menu__dividerwhen it is the only visible child of.rp-nav__others, e.g.:Or eject/override the
Navcomponent to conditionally render the divider.