I have the follwoing code in less file:
@winheight: unit(`document.documentElement.clientHeight`, px);
and I want to call that variable in:
.test {
height: ~"@{winheight}";
}
But I still get an error at variable @winheight
:
LESS: JavaScript evaluation error: 'TypeError: 'document.documentElement.clientHeight' is null or not an object'
How to fix this? Where is my mistake ?