mrcrowl / vscode-easy-less

Easy LESS extension for Visual Studio Code
MIT License
67 stars 23 forks source link

Calc Errors on Compile #15

Closed jgwhitley1017 closed 7 years ago

jgwhitley1017 commented 7 years ago

There seems to be an issue using variables with Calc. For Example, in the below code, you would expect height to be calc(100% - 92px), but it renders as calc(8%).

@sample-height: 92px;
div.foo {
  height: calc(100% - @sample-height)
}
mrcrowl commented 7 years ago

Yes, this is a known problem with less.

Possible workaround:

div {
    height: ~"calc(100% - "@sample-height~")";
}