5 * Calculate an em value from a px value
6 * @param {Number} $px - A value to be converted in em
7 * @param {Number} $base - The base pixel value of the app
8 * @return {Number} - The $px value converted in em
10 @function em($px, $base: $base-font-size) {
11 // Remove 'px' unit if present
12 $value: if(string.slice($px * 0 + '', 2, -1) == 'px', math.div($px, 1px), $px);
13 @return (math.div($value, $base)) * 1em;