I've been working through this issue for hours, and cannot come up with a solution. I've looked at several other StackOverflow posts that seem related (as well as the Vuetify docs), but nothing appears to be working for me. To start off, I'm simply trying to change the font-family from the default Roboto to Avenir. I receive no console errors or server errors.
@/styles/variables.scss
@import "~vuetify/src/styles/styles.sass";
$font-size-root: 14px;
@import "~vuetify/src/styles/settings/variables";
$body-font-family: 'Avenir Next', 'Lato', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; // $main-font comes from my own ./_variables.scss.
$heading-font-family: 'Avenir Next', 'Lato', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; // $title-font comes from my own ./_variables.scss.
@/plugins/vuetify.js
import 'material-design-icons-iconfont/dist/material-design-icons.css';
import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import 'vuetify/dist/vuetify.min.css';
Vue.use(Vuetify);
export default new Vuetify({
theme: {
options: {
customProperties: true,
},
themes: {
light: {
primary: '#4A90E2',
darkPrimary: '#3B73B4',
secondary: '#424242',
accent: '#82B1FF',
error: '#a70000',
info: '#2196F3',
success: '#4CAF50',
warning: '#FFC107',
teal: '#64EBC6',
green: '#7ED321',
darkGreen: '#4c8f1d',
lightGrey: 'rgba(0,0,0,0.12)',
darkGrey: '#4A4A4A',
textSecondary: 'rgba(0,0,0,0.4)',
},
},
},
icons: {
iconfont: 'md',
},
});
@/vue.config.js
module.exports = {
transpileDependencies: [
'vuetify',
],
configureWebpack: {
resolve: {
// alias: {
// '~': path.resolve(__dirname, '../frontend/src'),
// },
extensions: ['*', '.js', '.vue', '.json'],
},
},
// css: {
// loaderOptions: {
// scss: {
// prependData: '@import "@/styles/main.scss;"',
// },
// },
// },
// chainWebpack: config => {
// ['vue-modules', 'vue', 'normal-modules', 'normal'].forEach(match => {
// config.module.rule('scss').oneOf(match).use('sass-loader')
// .tap(opt => Object.assign(opt, { data: `@import '@/styles/main.scss'; ` }));
// });
// },
};
Any help would be appreciated!
.styl
files, but I'm assuming that.scss
would work the same way? 2. Also how do I know what is a "top-level variable" so that I make sure and set those above_variables.scss
? 3. I'm assuming I don't actually need to set the background color, and that was only an example of when I would set it? – Unchurch