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

error evaluating function fade: color.toHSL is not a function #75

Open
SinHide opened this issue Dec 24, 2020 · 9 comments
Open

error evaluating function fade: color.toHSL is not a function #75

SinHide opened this issue Dec 24, 2020 · 9 comments

Comments

@SinHide
Copy link

SinHide commented Dec 24, 2020

Describe the bug
Use this plugin will occur lessError when install new version's ant-design.

Show your code
Same as custom-cra demo.

Screenshots
error [LessError: error evaluating function fade: color.toHSL is not a function] {
stack: undefined,
type: 'Runtime',
filename: 'input',
index: 222509,
line: 8926,
column: 17,
callLine: NaN,
callExtract: undefined,
extract: [
' &.@{picker-prefix-cls}-cell-week {',
' color: fade(@text-color-inverse, 50%);',
' }'
]
}

Version
The latest version.

@SinHide
Copy link
Author

SinHide commented Dec 25, 2020

I find the problem, this will appear when I rewrite theme variables includes @white and @black.
This problem cause generating color.less abnormally.

@ko06
Copy link

ko06 commented Jan 5, 2021

solution please?

@mzohaibqc
Copy link
Owner

@ko06 don't use #fff, #ffffff, #000, #000000 color as variables you want to update. Don't put them in variables.less file which are you using with this plugin

@MasterBran
Copy link

@mzohaibqc i have the same problem when i use this plugin with version 1.2.6, but the error comes from the antd/lib/style/themes/default.less.what should i do

@mzohaibqc
Copy link
Owner

@MasterBran @ko06 @SinHide Can you recreate this issue and share public repo with me to look into. I can't reproduce this with this small info.

@MasterBran
Copy link

@MasterBran @ko06 @SinHide Can you recreate this issue and share public repo with me to look into. I can't reproduce this with this small info.

Sorry, I have solved this problem, thank you very much

@mzohaibqc
Copy link
Owner

@MasterBran can you kindly share your solution, that might help others.

@MasterBran
Copy link

@mzohaibqc make sure that the variable name in our project not exist in vars.less. and sometimes when we change the version of this plugin, we may need clean the cache of yarn or npm. I hope it's helpful

@MasterBran
Copy link

@mzohaibqc I can't send email to Gmail, but i want to know why you exclude the non color-dependent
variables from default, if i change your regexp,will it work?

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

4 participants