add scss
This commit is contained in:
parent
98c009d4fb
commit
6f769bac0e
@ -8,6 +8,8 @@ import { createVuetify } from "vuetify";
|
||||
import * as components from 'vuetify/components'
|
||||
import * as directives from 'vuetify/directives'
|
||||
|
||||
import './scss/index.scss'
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(createPinia());
|
||||
|
54
packages/dashboard/src/scss/_variables.scss
Normal file
54
packages/dashboard/src/scss/_variables.scss
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
TODO: Add docs on when to use placeholder vs when to use SASS variable
|
||||
|
||||
Placeholder
|
||||
- When we want to keep customization to our self between templates use it
|
||||
|
||||
Variables
|
||||
- When we want to allow customization from both user and our side
|
||||
- You can also use variable for consistency (e.g. mx 1 rem should be applied to both vertical nav items and vertical nav header)
|
||||
*/
|
||||
|
||||
// @forward "@layouts/styles/variables" with (
|
||||
// // Adjust z-index so vertical nav & overlay stays on top of v-layout in v-main. E.g. Email app
|
||||
// $layout-vertical-nav-z-index: 1004,
|
||||
// $layout-overlay-z-index: 1003,
|
||||
// );
|
||||
// @use "@layouts/styles/variables" as *;
|
||||
|
||||
$css-vars: (
|
||||
/*
|
||||
- Skins
|
||||
- CSS var
|
||||
- Theme
|
||||
*/
|
||||
"default": (
|
||||
"--v-theme-background": (
|
||||
"light": (244 ,245, 250),
|
||||
"dark": (40 ,36, 61),
|
||||
),
|
||||
"--v-theme-surface": (
|
||||
"light": (255, 255, 255),
|
||||
"dark": (49, 45, 75),
|
||||
),
|
||||
),
|
||||
"bordered": (
|
||||
"--v-theme-background": (
|
||||
"light": (255 ,255, 255),
|
||||
"dark": (49, 45, 75),
|
||||
),
|
||||
"--v-theme-surface": (
|
||||
"light": (255, 255, 255),
|
||||
"dark": (49, 45, 75),
|
||||
),
|
||||
),
|
||||
) !default;
|
||||
$theme-colors-name: (
|
||||
"primary",
|
||||
"secondary",
|
||||
"error",
|
||||
"info",
|
||||
"success",
|
||||
"warning"
|
||||
) !default;
|
||||
|
@ -1,4 +1,7 @@
|
||||
@use 'vuetify' with (
|
||||
$utilities: true,
|
||||
$color-pack: true,
|
||||
);
|
||||
// main.scss
|
||||
@use '_variables';
|
||||
|
||||
@use 'vuetify/settings' with (
|
||||
$color-pack: false,
|
||||
$utilities: false,
|
||||
);
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
const theme = 'dark'
|
||||
const theme = 'light'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -11,4 +11,17 @@ export default defineConfig({
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
},
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
sass: {
|
||||
additionalData: [
|
||||
// Make the variables defined in these files available to all components, without requiring an explicit
|
||||
// @import of the files themselves
|
||||
'@import "./src/scss/index"',
|
||||
'@import "vuetify/src/styles/settings/_variables"',
|
||||
'', // end with newline
|
||||
].join('\n'),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user