Can't override theme vars with Vue 3 config? #6674
-
I'm struggling to override the default colours for Antd. Here's my setup: package.json
main.js
App.vue
I have Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
daiwanxing
Jun 26, 2023
Replies: 1 comment 6 replies
-
@mitya33 hey, you don't need to install // vite.config.js
export default defineConfig({
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
modifyVars: {
// all overridable less variables could be found in
// https://github.com/vueComponent/ant-design-vue/blob/main/components/style/themes/default.less
"@primary-color": "red",
}
}
}
}
}) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, I noticed that you imported the style from
ant-design-vue/dist/antd.css
file. Instead, please import the library style fromant-design-vue/dist/antd.less
.a minor live demo in here: https://codesandbox.io/p/sandbox/late-dew-txstj8?file=%2Fsrc%2FApp.vue%3A26%2C12