Is their a way in sass to change the digit that rounding occurs on, I would like to stop rounding of a number like this 2.0242914979757085% to this 2.024%. I would like to a
You could also do the following:
@function ceilHundredths($numbers) {
$numbers: $numbers * 10000;
@if ($numbers < 1) {
$numbers: $numbers - 1;
} @else {
$numbers: $numbers + 1;
}
@return round($numbers)/ 100#{"%"};
}
.test--regular {
margin-left: percentage( -1 / 3 );
}
.test {
margin-left: ceilHundredths( -1 / 3 );
}
.test--regular--2 {
margin-left: percentage( 1 / 3 );
}
.test--2 {
margin-left: ceilHundredths( 1 / 3 );
}