Skip to content

Instantly share code, notes, and snippets.

@upalexgill
Created April 11, 2023 21:44
Show Gist options
  • Save upalexgill/50b06233b035fd1cba1ca3a513ed589b to your computer and use it in GitHub Desktop.
Save upalexgill/50b06233b035fd1cba1ca3a513ed589b to your computer and use it in GitHub Desktop.
Vue 3 and Vuetify 3 SASS variable overrides
// src/scss/variables.scss
$body-font-family: 'Noto Sans', sans-serif;
@use 'vuetify' with (
$body-font-family: $body-font-family,
$heading-font-family: $body-font-family
);
// src/plugins/vuetify.ts
import '@mdi/font/css/materialdesignicons.css';
import 'vuetify/styles';
import '@/scss/variables.scss'
import { createVuetify, ThemeDefinition } from 'vuetify';
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';
const customLightTheme: ThemeDefinition = {
dark: false,
colors: {
primary: '#00004E',
secondary: '#C3B195',
accent: '#0DBDBA',
}
}
export default createVuetify({
components,
directives,
theme: {
defaultTheme: 'customLightTheme',
variations: {
colors: ['primary', 'secondary', 'accent', 'error', 'info', 'success', 'warning'],
lighten: 5,
darken: 5,
},
themes: {
customLightTheme,
}
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment