Open altynbek07 opened 4 years ago
Try importing them via a plugin in nuxt.config
~/plugins/vendor/vuetify'
import '~/sass/overrides.sass';
@marcpaskell As a temporary solution, I did this:
In file nuxt.config.js
:
...
css: [
// '~assets/scss/style.scss'
],
...
In file layouts/default.vue
:
...
<style lang="sass">
@import assets/scss/style.scss
</style>
I tried this temporary solution and it worked for a while. As of late we tried to remove our seperate layouts and used only one: the default.vue
. Now this temporary fix doesn't work anymore in dev, only in production builds.
Any updates on this issue?
You have to override sass variables and even style using customVariables
option
file: nuxt.config.js
...
buildModules: [
['@nuxtjs/vuetify',
{
...
treeShake: true,
customVariables: ['~/assets/styles/vuetify/variables'],
}
],
]
enabling treeShake is important!
and then change variables or override style
file: assets/styles/vuetify/variables/index.scss
$body-font-family: 'Cairo';
.container {
width: 100%;
padding: 12px;
margin-right: auto;
margin-left: auto;
}
@import "~vuetify/src/styles/styles.sass";
Module version @nuxtjs/vuetify@1.11.0
Describe the bug I want to overwrite default vuetify styles (not variables) with my custom styles. But vuetify styles is overwritten with custom styles.
To Reproduce For example: In file
nuxt.config.js
:In file
assets/scss/style.scss
:Expected behavior I have a lot of files where I redefine styles and so I want my
.container
class styles to apply. Is there any correct way to prioritize my class files?Additional context default
.container
class styles:Screenshots