height: calc(100% + 60px);
Above code will failed, any clue how to add extra 60px to a height of 100% using LESS?
height: calc(100% + 60px);
Above code will failed, any clue how to add extra 60px to a height of 100% using LESS?
The height in percentage does not work properly every time. It will work fine if your parent have fix height (either in px, pt, view port unit).
Its better to use view port for height. If you are not aware of it, read the following article.
LESS and CSS have a calc
function. If you want to use the CSS calc function instead of LESS's, then you need to escape your equation. Like so:
height: calc(~"100% + 60px");
You can still pass LESS variables into this calc
call. You need to encapsulate your variable with brackets though. Like so:
@padding-variable: 60px;
height: calc(~"100% + @{padding-variable}");