I have the following Sass rule:
$multiplier: 1/3*100;
.ratio_1x0-5{
padding-bottom: 0.5%*$multiplier;
}
Which outputs the following css:
.ratio_1x0-5{
padding-bottom: 16.6666666667%
}
Instead - I need this rule to be the following (the decimal precision isn't important - only that the last value is a 6 - not a 7), this is to resolve a subpixel rendering issue.
.ratio_1x0-5{
padding-bottom: 16.6666%
}
If I use the sass 'floor' function - it rounds down the whole thing to '16%'. Is there any way to round down to x number of decimal places in Sass? How about using a mixin to do this? I'm using libsass (sass 3.2).
Adjusting the 'precision' doesn't work - the last value is still '7'. Changing precision alone only truncates the number of decimal places - it doesn't round the last decimal place down like I need it to.
Codepen: http://codepen.io/calumbrodie/pen/aOzVga
Edit: Whoever marked this as a duplicate - this is a different question, the other question is about 'precision', while I explicitly explain why this isn't about 'precision'. I can't really make it any clearer.