//
// Convert font-size from px to rem with px fallback
//
// @param $size - the value in pixel you want to convert
//
// e.g. p {@include font-size(12px);}
//
//

// Function for converting a px based font-size to rem.
@function em-calc($size) {
  $em-size: $size / 16px;
  @return #{$em-size}em;
}

@function rem-calc($size) {
  $rem-size: $size / 16px;
  @return #{$rem-size}rem;
}

// Mixin that will include the fall back px declaration as well as the calculated rem value.
@mixin font-size($size) {
  font-size: rem-calc($size);
}
