Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use ant less colors in theme.less file ? #17

Open
LoicUV opened this issue Jun 6, 2019 · 1 comment
Open

How to use ant less colors in theme.less file ? #17

LoicUV opened this issue Jun 6, 2019 · 1 comment

Comments

@LoicUV
Copy link

LoicUV commented Jun 6, 2019

Hi,

The way to use default colors in antd is to import '~antd/lib/style/themes/default.less' in one of your less files.

I tried to import the base color file from @import '~/antd/lib/style/color/colors'; in the theme.less but it's ignored (which I assume is normal behaviour).

Is there any other way than to compile the colors to hex and put them at the top of the file, or to import the file in my code outside theme.less (which is not optimal since I need colors to redefine some variables) ?

@Janaka-Steph
Copy link

In antd.customize.less I have:

@import '~antd/lib/style/themes/default.less';
@body-background: @black;
...

But getting error Variable @black is undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants