mrcrowl / vscode-easy-less

Easy LESS extension for Visual Studio Code
MIT License
68 stars 22 forks source link

Error compiling #95

Closed bagaweb closed 1 year ago

bagaweb commented 1 year ago

This is the error appearing in problems after saving the .less file:

Error evaluating functionunit: the first argument to unit must be a number. Have you forgotten parenthesis?

This is the less code giving the error on the last line:

.loop(@index) when(@index =< 12) {
  .nav-open li:nth-child(@{index}) {
    transition-delay: unit(@index / 10, s);
  }
  .loop(@index + 1);
}
.loop(0);
mrcrowl commented 1 year ago

I would recommend adding parentheses around @index / 10. I believe that is causing the issue you're seeing.

This can be further controlled via the "math" setting.

bagaweb commented 1 year ago

Thank you very much, that did the trick!