babel-plugin-import icon indicating copy to clipboard operation
babel-plugin-import copied to clipboard

在引入 less 的情况下,如何使用自己的 theme?

Open zation opened this issue 10 years ago • 4 comments

如果我希望用自己的 theme 来覆盖 ant 自带的,那我是不是就不能用 style: true 这个配置了,而必须手动引入所有的 less 文件,并且引入自己的 theme.less ?

zation avatar Oct 05 '16 15:10 zation

style: true 就是走的 less 文件吧。

sorrycc avatar Oct 08 '16 02:10 sorrycc

@sorrycc 对,但是我需要覆盖 ant 自带的 themes/default.less 的 variables... 现在所有的 component 的 less 都直接 @import "../../style/themes/default";,导致我好像没有办法去覆盖它?

zation avatar Oct 10 '16 07:10 zation

变量可以覆盖,但是ant定义的变量还是不够多,很多样式还是需要全局覆盖。 #78

pfdgithub avatar Oct 12 '16 03:10 pfdgithub

参考:https://github.com/ant-design/antd-init/tree/master/examples/customize-antd-theme

afc163 avatar Oct 25 '16 11:10 afc163