/**
 * Strips units from a number
 */

@function strip-unit($num) {
	@return $num / ($num * 0 + 1);
}

/**
 * Convert value to REM
 */

@function rem($target, $context: $root-font-size) {
	@return (strip-unit($target) / strip-unit($context)) * 1rem;
}

/**
 * Convert value to EM
 */

@function em($target, $context: $root-font-size) {
	@return (strip-unit($target) / strip-unit($context)) * 1em;
}

/**
* Convert points to px
* by making up for the difference in DPI.
* you could also do $target& * 1.33333 and get the same result
*/
@function ptpx($target) {
	@return (strip-unit($target) / 72) * 96;
}

/**
* Convert points to REM
*/
@function ptrem($target) {
	@return rem(ptpx($target));
}
