Sass/SCSS Logo

Mixin: px to rem

/*  
    Used for making px values convert to rem values
    Usage: define font-size in px and it will convert to rems
    eg. font-size: rem(14px);
*/

@function rem($target, $context: $base-font-size) {
   @if $target == 0 { @return 0 }
   @return $target / $context + 0rem;
}
$base-font-size:16px;