how can I overwrite actual classes in vuetify?
I have created a ./src/stylus/main.styl file where I override some of the current vuetify settings as a test:
@import '~vuetify/src/stylus/settings/_variables'
@import '~vuetify/src/stylus/elements/_typography'
$material-dark.background = green
$body-font-family = Arial
$alert-font-size = 18px
.display-2
font-size: $headings.h6.size !important
font-family: $headings.h3.font-family !important
@import '~vuetify/src/stylus/main'
For some reason the above values only work partially. The new values assigned to $material-dark.background
and $body-font-family
work fine for anything under the theme--dark
however when it comes to .display-2
these values are still calling the original settings for both font-size
and font-family
and override the ones I added to main.styl. I even tried going inside the component which contains the .display-2
first in stylus as scoped language which did not work then in plain css which does not throw an error but gets ovewriten by Vuetify's original default generated in the app.xxx.css and chunk-vendor.xxx.css files.
//component
<style scoped>
h1.display-2{
font-size:20px;
font-family: "Times New Roman";
color:green;
}
</style>
Is there a reason for this?
main.styl
to something like this:h1.display-2 font-size: 30px!important font-family: Times New Roman!important color:$indigo.base
. But I find adding "!important!" to everything messy. Any cleaner ways to override the style values? – HGB