Why is every CSS rule !important
?
#17354
Replies: 3 comments 1 reply
-
You mean the utility classes? They're kinda useless without it. |
Beta Was this translation helpful? Give feedback.
-
Hi all. I noticed the same issue when upgrading Vuetify 2 to 3. For example, in V2 I was able to do |
Beta Was this translation helpful? Give feedback.
-
I use Fluidd which uses vuetify. Fluidd offers a custom.css for custom stylesheets, which does not work because vuetify uses !important EVERYWHERE. I made a search on just one page and found over five thousand (5000!!!) instances of !important. This is extremely poor standard. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
Vuetify Version: 2.6.15
Vue Version: 2.7.14
Browsers: Chrome 113.0.0.0
OS: Windows
Steps to reproduce
Expected Behavior
Actual Behavior
Reproduction Link
https://codesandbox.io/s/vue
Other comments
I wanted to click "Discussion" when creating the issue, but the button is disabled...
Here is a very small snippet of the compiled Vuetify CSS. Hit CTRL-F/CMD-F on your keyboard and type
!important
. Enjoy the disco.Why does Vuetify mark every one of its own rules as "!important" in the compiled CSS?
We're in the process of migrating from Webpack to Vite, and due to the order in which CSS files are included have changed, our own rules (that also are marked with
!important
) don't get precedence anymore and it's now practically impossible to manage these styles.What is the reason for a library to mark their own default CSS as
!important
?Beta Was this translation helpful? Give feedback.
All reactions