Closed ambienthack closed 3 years ago
Having same issue after upgrading lessc
cli tool.
It's because the version 4 of Less set the math option to by default require parentheses for division based operations, and then neglected to mention this obviously breaking change in their change-logs. It's hidden away in the documentation.
http://lesscss.org/usage/#less-options-math
To fix it you need to set the lessc option for math to be always, or manually go through and add parentheses to your division operations.
.selector { width: 50vh/2; }
would become
.selector { width: (50vh/2); }
I sort of understand why they implemented that change, because there is a valid CSS shorthand that uses the division operator. But I think this is something they should have mentioned because it completely breaks entire applications.
I can confirm, that the solution suggested by https://github.com/less/less.js/issues/3608#issuecomment-811086683 works for me. So I'm closing the issue.
Problem: division operation is not compiled as expected.
Steps to reproduce:
output
Environment: Windows 10, less@4.1.1
In my tests this problem was observed starting from 4.0.0