mrcrowl / vscode-easy-less

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

CSS calc expression operand types are interpreted after the first operand type #10

Closed salaros closed 7 years ago

salaros commented 7 years ago

The following expression min-height: calc(100% - 71px) compiles to min-height: calc(29%)

While min-height: calc(1000px - 5%) compiles to min-height: calc(995px);

salaros commented 7 years ago

OK, that's not VS Code Extension's bug, it's LESS aggressive calc operand processing Solved by wrapping the expression with quotes and perpending ~ char: min-height: calc(~"100% - 71px")