【发布时间】:2021-09-18 00:06:29
【问题描述】:
我正在使用 Vuetify/Nuxt 构建一个网站,并在我的 nuxt.config.js 文件中自定义主题,如下所示:
vuetify: {
customVariables: ['~/assets/variables.scss'],
treeShake: true,
theme: {
options: {
customProperties: true
},
dark: true,
themes: {
dark: {
background: '#291c07',
primary: '#7d521a',
accent: '#6b3d01',
secondary: '#3b280b',
grey: "#fff",
neutralgray: "#fff",
}
}
}
},
然后,在我的variables.scss 文件中,我有这个:
$heading-font-family: 'Permanent Marker';
$body-font-family: 'Neucha';
$font-size-root: 24px;
@import '~vuetify/src/styles/styles.sass';
$material-light: map-merge($material-light, (
'background': var(--v-background-base, map-get($material-light, 'background')) !important,
));
$material-dark: map-merge($material-dark, (
'background': var(--v-background-base, map-get($material-dark, 'background')) !important
));
除了Tabs component 的字体颜色外,一切都按预期工作。它默认为灰度值,我无法确定需要覆盖哪些颜色变量才能更改此默认颜色。有谁知道哪个变量控制 Vuetify 选项卡组件中的字体/图标颜色?
【问题讨论】:
标签: vue.js nuxt.js vuetify.js