You have two problems. First:
`$.trim( $(window).height() ) + 'px'`
This code evaluates to "400px" (note the quotation marks " ). This will invalidate the CSS rule because it does not use quotation marks. Also, $.trim is redundant because .height() returns an integer.
The second problem:
height: @clientHeight - 100;
This will take a previously created line and try to perform an illegal mathematical operation on it. This is what throws an error.
Here's how you can do it:
@color :
The latest code 0px + @clientHeight is just a trick for adding px to a variable.
You can probably solve your problem using pure CSS instead of calculating in LESS (and also make scaling when changing the window size) with the following code:
html,body{ height:100% } #box{ position:absolute; top:0; bottom:100px }
source share