vuejs / vitepress

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

CSS bug #3644

Closed Mt-Youya closed 8 months ago

Mt-Youya commented 8 months ago

Describe the bug

content 部分没有 overflow:hidden 导致很长的滚动条(也有可能是我的图片太大?)

github here

site here

Reproduction

我fork 别人的仓库,不是我自己写的, 它原本用的是 docsify 我想提个pr用vitepress 试试,然后就出现了这个bug

Expected behavior

没有滚动条

System Info

Version 122.0.6261.112 (Official Build) (64-bit)
win11

Additional context

No response

Validations

brc-dd commented 8 months ago

Try adding this to css:

/* .vitepress/theme/custom.css */

pre, mjx-container {
  overflow-x: auto;
}

mjx-container {
  margin-bottom: -8px;
}

(https://vitepress.dev/guide/extending-default-theme#customizing-css)

It will force a scrollbar. But the issue is markdown though:

- **ROC曲线和PR曲线**

        如图2-3,ROC曲线是......

Is the 如图2-3,ROC曲线是...... expected to be in a code block? I think it should not be indented:

- **ROC曲线和PR曲线**

   如图2-3,ROC曲线是......
Mt-Youya commented 8 months ago

Thanks! It works!