view-design / ViewUI

A high quality UI Toolkit built on Vue.js 2.0
https://www.iviewui.com/
Other
2.65k stars 797 forks source link

[Bug Report]Don’t apply a global reset/normalization #947

Open ihepta opened 3 years ago

ihepta commented 3 years ago

Environment

not important

Reproduction link

https://www.iviewui.com/not-important

Steps to reproduce

When you start a new project, it’s quite common to include a reset.css or normalize.css file to reset the default styles from the browser. But for shared libraries, this can be quite dangerous.

Once the consumer imports your library’s CSS, it will visually break their application unless your reset file and theirs are exactly the same, which is highly unlikely.

Instead, you can do a reset at the component level.

What is expected?

eliminate reset css from dist/styles/iview.css

It’s a good idea to add a robust reset file in your components CSS. In this case, the more robust the reset is, the less likely it is that you’ll run into problems.

What is actually happening?

It will visually break their application unless your reset file and theirs are exactly the same, which is highly unlikely.