NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.85k stars 3.9k forks source link

@border-radius-base Modify parameter error #7895

Open okgo123 opened 1 year ago

okgo123 commented 1 year ago

Reproduction link

https://stackblitz.com/github/okgo123/test2?file=src%2Fstyles.less

Steps to reproduce

body{ --pgy-border-radius:16px; --ant-primary-color: blue; } @border-radius-base:~'var(--pgy-border-radius)';

What is expected?

Expected to be assigned by --pgy-border-radius。Do not want to use @border-radius-base:16px to assign

What is actually happening?

transition: left @animation-duration-slow ease-out; .roundedArrow(@arrow-size, 5px, @calendar-bg); ^ Error evaluating function unit: the first argument to unit must be a number Error in /Users/bingchuan/work/test/test2/node_modules/ng-zorro-antd/date-picker/style/index.less (line 332, column 4)

Environment Info
ng-zorro-antd 15.0.2
Browser chrome
Laffery commented 1 year ago

What about the following usage?

@border-radius-base: var(--pgy-border-radius);