Reputation: 41
Vuetify allows us to change the default themes and presets by using a variables.scss/sass file in our project. But I am unable to figure out how to change the font-style/font-weight (or any other global properties except the color) for the entire app, dynamically on the fly. For Example: We have a vue application running and the global font is currently set to Roboto, What I want to do is provide a list of available fonts in a v-select and dynamically feed the selected value(suppose Raleway) in the variables.scss file or somehow trigger Vuetify to pick up the updated font-family (even other customizations), and change the default font to Raleway for the entire application. I don't want to add classes everywhere. It won't be maintainable.
Any ideas on how can this be achieved? Thanks in advance!
Upvotes: 4
Views: 205
Reputation: 7623
Changing the font app-wide is possible through the variables file as you mention, but this is a build-time decision. If you're wanting the user to swap out the font in the running app, there isn't any mechanism for this as far as I know, because the app is already compiled and running.
Upvotes: 1