Skip to content

Using antd less variables in components #72

@nerdess

Description

@nerdess

I am customizing my ant design app using craco-antd which works very well :)

Now I'd like to use antd less variables inside the various .less files of my components. So that I can do stuff like e.g:

.card { padding-top: @padding-md; }

I am able to get it to work when I add

@import 'antd/dist/antd.less';

at the top of each .less file that uses an antd variable but that seems quite cubersome. Is there no way to add the variables globally?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions