// Custom functions
//

// Px to rem
// Usage font-size: rem(24px);
@function rem($pixels, $context: 16px) {

    @if (unitless($pixels)) {
      $pixels: $pixels * 1px;
    }

    @if (unitless($context)) {
      $context: $context * 1px;
    }

    @return $pixels / $context * 1rem;
}