Skip to content

Commit

Permalink
[Update] Added a utility function to shorten decimal values
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Feb 25, 2021
1 parent f038b80 commit 189fada
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Resources/public/framework/scss/mixins/_utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,12 @@
}
@return unquote($result);
}

@function shorten-decimal-value($number) {
@if unitless($number) {
@return (floor($number * 1000000) / 1000000);
}
@else {
@return $number;
}
}

0 comments on commit 189fada

Please sign in to comment.