vuejs / vitepress

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

默认主题下设置的侧边栏背景色在暗色时看不出来,切换成亮色主题时发现侧边栏背景色(灰色)和主题(白色)不和谐,有单独设置的配置吗,或者你们改下默认值 #3771

Closed dong-lufei closed 2 weeks ago

dong-lufei commented 2 weeks ago

如下官方中文文档:https://vitepress.dev/zh/guide/custom-theme ,在亮色主题下可看到左侧边栏是灰色,而右侧边栏和网站主题背景色都是白色,此时灰色显得碍眼

dong-lufei commented 2 weeks ago

999

dong-lufei commented 2 weeks ago

我暂时是通过改变亮暗主题下的 --vp-sidebar-bg-color 变量方式解决的:

:root {
  --vp-sidebar-bg-color:#fff;
}
:root.dark{
  --vp-sidebar-bg-color:#161618;
}
meteorlxy commented 2 weeks ago

This is by design. The sidebar bg color is also different from the right side in dark mode.

"此时灰色显得碍眼" is a personal taste. We may update it if there are lots of similar feedback.

For now, updating --vp-sidebar-bg-color to your own preference is the correct solution.