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

The generated color.less is not correct if two color variables are same. #2

Closed
gaohuijue opened this issue Jun 12, 2018 · 1 comment

Comments

@gaohuijue
Copy link

css = css.replace(new RegExp(`${color}`, "g"), varName);

variables.less

@import "../../../../../node_modules/antd/lib/style/themes/default";
@primary-color: #ff2a00;
@btn-primary-bg: #ff2a00;// Same as primary-color

color.less

...
a {
  color: @btn-primary-bg;
  background-color: transparent;
}
...

Sory,my English is poor.
I think you may warn developers notify this.Tell them not set same color value.

@mzohaibqc
Copy link
Owner

@gaohuijue You are right. Assigning same default value to color variables does not work. I'll add this in documentation

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