I usually use SCSS as it's the trend and the one I prefer. I used Less for comparison between both. I found that there is something really strange when using Less.
When I use the calc function with SCSS for example like height: calc(100vh - 64px)
, it converts the 100vh
to px
, then subtracts the two numbers and converts it back into vh
unit which exactly what is needed.
On the other hand, when doing the same but with Less, it immediately converts the number after the minus sign to be the same unit as the one before and then subtracts the number which is very strange. Because in the former example the calculated height; using Less; would be 36vh
which is calc(100vh - 64vh)
which is not the case.
Does anyone have any idea how to solve this problem when using Less?