Skip to content

Indent/padding added to sidebar menu items #5027

@dpi

Description

@dpi

Describe the bug

The changes introduced in #4653 appear to cause the menu items in the sidebar to be indented.

Previously, menu items appeared to align perfectly with a text-only site title.

But with the recent Vitepress release, menu items are indented slightly.

I dont think the changes from #4653 align with adding this ident.

Reproduction

Particularly when there is a scrollbar on the page.

Firefox143

  • Any new site on http://vitepress.new/
  • Navigate into any page that isnt the homepage, e.g /example.html
  • Change the viewport so a viewport level scrollbar appears on the page.

Short viewport

Image

Tall viewport

Image

Expected behavior

Menu items should always align with title.

System Info

System:
    OS: macOS 26.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 522.95 MB / 64.00 GB
    Shell: 3.7.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 23.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - /opt/homebrew/bin/npm
  Browsers:
    Firefox: 143.0.4
    Firefox Developer Edition: 145.0
    Safari: 26.0.1
  npmPackages:
    vitepress: 2.0.0-alpha.12 => 2.0.0-alpha.12

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    themeRelated to the theme

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions