Open zxbeltm opened 2 years ago
https://github.com/arco-design/arco-design-vue/blob/main/packages/web-vue/components/style/normalize.less
/** * Add the correct display in IE 10. */ [hidden] { display: none; }
使用arco.design组件会生成样式:
[hidden] { display: none !important; }
这样导致了unocss的 md:block hidden 样式失效:
@media (min-width: 768px) .md\:block, [md\:block=""] { display: block; } [hidden=""] { display: none; }
在项目vite3 vue3 unocss arco.design中: // main.css
html { font-size: 4px; }
// App.vue
<div w-380 md:block px-20 py-35 hidden> 达到最小宽度后会隐藏 </div> <a-badge :count="9" dot :dotStyle="{ width: '10px', height: '10px' }"> <a-avatar shape="square" /> </a-badge>
😅 纳闷这个 important 是怎么出现的
Basic Info
Extra info
https://github.com/arco-design/arco-design-vue/blob/main/packages/web-vue/components/style/normalize.less
What is expected?
使用arco.design组件会生成样式:
这样导致了unocss的 md:block hidden 样式失效:
Steps to reproduce
在项目vite3 vue3 unocss arco.design中: // main.css
// App.vue