leafo/lessphp — pull request #347 by cvele (2012-12-04 10:40:20+00:00)
Title: adding precision to round function

eg.
.font_size(@size, @base: @baseFontSize) {
@fontSize: round(percentage(@size/@base), 2);
font-size: ~"@{fontSize}";
}

request i got:
"Do you think it will be possible to support round(value, precision = 2) ?

We are using a mixin for font typography which is creating relative font sizes based on base font size (https://gist.github.com/9a94760ff1a2fca0815e). The problem we are facing with the less round function (http://lesscss.org/#-math-functions) is that on some elements by rounding the value without precision some font-sizes are looking different (font-size: 87% vs font-size: 87.5%).

There was no problem on TXF where we did the css from the PSD, but on AI some elements the font-size is visible different than on the original. Currently, i removed the round function and some css properties are having font-size:91.666666666667%;"