关于theme-default的样式问题 #928
Replies: 1 comment 3 replies
-
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Mister-Hope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我使用vuepress以及自带的theme-default构建了组件库文档,但在编写组件demo的过程中发现组件样式会受到影响,排查发现是由于packages/@vuepress/theme-default/src/client/styles/normalize.scss这个文件下添加了一些元素全局样式重置了我的组件,例如:
th, td { padding: 0.6em 1em; border: 1px solid var(--c-border-dark); transition: border-color var(--t-color); } h2 { font-size: 1.65rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--c-border); transition: border-color var(--t-color); }
这些样式就完全影响了我组件的样式,这个有什么好的解决方案么?在组件内部覆盖也不是一个很好的选择
Beta Was this translation helpful? Give feedback.
All reactions