$transform_ems: false;

@function em($pixels, $context: $default_font_size) {
  @if ($transform_ems) {
    @if (unitless($pixels)) {
      $pixels: $pixels * 1px;
    }

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

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

@mixin font_smoothing {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@mixin absolute_properties() {
  @content;
  @media screen and (min-width: $max_breakpoint) {
    $transform_ems: true !global;
    @content;
    $transform_ems: false !global;
  }
}