vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.33k stars 1.83k forks source link

Markdown section's dom padding is not stable #3775

Closed fuzhenn closed 2 weeks ago

fuzhenn commented 2 weeks ago

Describe the bug

The padding of the markdown content dom is not stable, causing the sidebar to shift slightly when switching between markdowns via the sidebar.

Reproduction

Referring to the link below, when switching between clicking on link 1 and link 2 at bottom of the sidebar, you will notice that the sidebar is slightly shifting.

https://vitepress.dev/zh/guide/mpa-mode

image

Expected behavior

The sidebar remains stable

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 5.25 GB / 15.94 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.14.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.81)
  npmPackages:
    vitepress: 1.0.1 => 1.0.1

Additional context

No response

Validations

brc-dd commented 2 weeks ago

Can you show a screen recording, seems to be working fine for me 👀

fuzhenn commented 2 weeks ago

Of course! screenshot

brc-dd commented 2 weeks ago

Ah, it's windows thing. Duplicate of #1054

fuzhenn commented 2 weeks ago

Got it, Thanks!