less/less.js — pull request #1769 by lesswtf (2013-12-30 02:25:40+00:00)
Title: If result of evaluated javascript is a number return it as Dimension.

Fix for issue #1768

Use-case:
```
@outerWidthPx: 100px;
@borderWidthPx: 1px;

.element {
width: @outerWidthPx - @borderWidthPx * 2;
border: @borderWidthPx solid #000;

&.small {
// Half of @borderWidthPx, but not smaller than 1px
@halfBorderWidth: unit(~`Math.max(1, Math.floor(parseInt("@{borderWidthPx}") / 2))`, px);

border-width: @halfBorderWidth;
width: floor(@outerWidthPx / 2) - @halfBorderWidth * 2;
}
}
```