@use "sass:math";

$browser-context: 14;

@function calculateEm($pixels, $context: $browser-context) {
  @if (math.is-unitless($pixels)) {
    $pixels: $pixels * 1px;
  }

  @if (math.is-unitless($context)) {
    $context: $context * 1px;
  }

  @return #{math.div($pixels, $context)}em;
}
