Created
April 11, 2023 21:44
-
-
Save upalexgill/50b06233b035fd1cba1ca3a513ed589b to your computer and use it in GitHub Desktop.
Vue 3 and Vuetify 3 SASS variable overrides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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