customize theme build the less file error
See original GitHub issueVersion
2.13.9
Environment
browser
Reproduction link
https://github.com/ant-design/antd-init/issues/126
Steps to reproduce
origin this issue: https://github.com/ant-design/antd-init/issues/126
What is expected?
should compile without error
What is actually happening?
./src/index.less Module build failed:
color: @text-color-secondary;
.iconfont-size-under-12px(9px);
^
Error evaluating function unit
: the first argument to unit must be a number. Have you forgotten parenthesis?
…/antd/lib/cascader/style/index.less (line 94, column 6)
and less ^2.7.2 less-loader: ^4.0.5 and only with options: strictMath: true,
I thought this is a simple issue. Hope someone from antd will nicely resolve this
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Problem while compile less in custom theme of magento 2
Make sure your own Less files don't have the same name as the Less files from the Luma theme!
Read more >LESS css compile error - Stack Overflow
@theme-images-dir appears to be defined and included in another less file before this statement is reached. Any hints as to what is happening ......
Read more >Error loading file theme.less - YOOtheme Support
Usually "Error loading file theme.less" implies that the URL is invalid, meaning the file doesn't exist in the defined location. The syntax in ......
Read more >Theme Compilation Issue Due to missing '{' or '}' in Input Less ...
When attempting to compile a theme, an error message similar to the following occurs: Making a change to a single less file in...
Read more >Customize Theme - Ant Design
In version 5.0, we provide a new way to customize themes. Different from the less and CSS variables of the 4.x version, with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gustav0 @mendoncanorma I had the same issue but I think I have resolved it. If you check the Less options documentation here: https://lesscss.org/usage/ it states that the
strictMath
option was replaced by themath
option.Set
math: 'always'
in your less options for it to compile like it did in Less v3you did a great thing ~~ in Chinese is 🐂🍺 。。