Sass Error: '90var(--num) is not a number' - How to Fix
This error occurs because the variable '--num' is not being recognized as a number by the Sass compiler.
To fix this, you need to ensure that the variable '--num' is defined with a numeric value.
For example, you could define it like this:
:root {
--num: 10;
}
Then, your SCSS code would work as expected:
@for $val from 1 to var(--num) {
// loop code here
}
原文地址: https://www.cveoy.top/t/topic/mJ4l 著作权归作者所有。请勿转载和采集!