Thursday, March 1, 2018

calc misbehaves in LESS

To get it to work you have to do something like this:

height: ~"calc(100% - 69px);"

 
 

If you want to use a LESS variable, do so like this:

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

 
 

Addendum 5/16/2018: You have to have the two spaces on either side of the hyphen dividing the two measurements. You cannot snug the hyphen up to things.

No comments:

Post a Comment