Check out the step-by-step instructions provided in
https://vuetifyjs.com/en/style/theme
. I successfully changed the theme using the code below with vuetifyjs version 0.13.0
.
However, after updating to vuetifyjs 1.0.5
, the font still displays correctly but all the colors are no longer working post the update.
I presume this issue might be linked to the changes made in
//node_modules/vuetify/src/stylus/main.styl
and //node_modules/vuetify/src/stylus/theme.styl
as the variable $theme
was defined in v0.13.0 but not in v1.0.0?
Any clues or explanations would be much appreciated. Thank you.
# File: //src/stylus/main.styl
/** Stylus Styles */
@import '../../node_modules/vuetify/src/stylus/settings/_colors'
$theme := {
primary: $deep-purple.darken-1
accent: $deep-purple.accent-2
secondary: $deep-orange.darken-1
info: $blue.darken-2
warning: $amber.darken-2
error: $red.darken-2
success: $green.darken-2
}
$body-font-family := 'Share Tech Mono'
@import '../../node_modules/vuetify/src/stylus/main'
Update:
Following the suggestion by Traxo, the modification in //src/main.js
using the code below resolved the issue.
# Vue.use(Vuetify)
Vue.use(Vuetify, {
theme: {
primary: '#5e35b1', // $deep-purple.darken-1
accent: '#7c4dff', // $deep-purple.accent-2
secondary: '#f4511e', // $deep-orange.darken-1
info: '#1976d2', // $blue.darken-2
warning: '#ffa000', // $amber.darken-2
error: '#d32f2f', // $red.darken-2
success: '#388e3c' // $green.darken-2
}
})