/* PX to REM ========================================================================== */ @function rem ($target, $context: $base-font-size) { @if $target == 0 { @return 0 } $size: $target / $context; @return round($size * 1000) / 1000 + rem; } /* Headings ========================================================================== */ @function headings ($from: 1, $to: 6) { @if $from == $to { @return "h#{$from}"; } @else { @return "h#{$from}," + headings($from + 1, $to); } }