In LESS I used following code to get the window\'s height.
@winheight:`$(window).height()`
What I\'m getting is a number, but when i add
This might work depending on LESS which I do not know well.
Reading the docs this is a possibility.
@winheight:0px + `$(window).height()`
What about this:
@winheight:`$(window).height().toString() + "px"`
try this
@winheight:`$(window).height()+"px"`
height: @winheight;
because .height() returns only unit-less pixel value.
alternatively use the following
@winheight:`$(window).css("height")`
height: @winheight;
.css("height") returns a value with units
give this code and see what is you get it.
@winheight:0px + `$(window).height()'
Simply use string interpolation and then escape from the string using ~
:
@winheight:`$(window).height()`;
height: ~"@{winheight}px";
Take .css(height)
instead of .height()
- this returns the value + unit.