/*  ========================================================================
//  #FONT-SIZE - DEPRECATED (set font size in css)
//  ======================================================================== */

// Generates a rem font-size and sets a default line-height.
//   @include au-font-size(1.4rem);
//
// You can force a specific line-height by passing it as the second argument:
//
//   @include au-font-size(1.4rem, 1);

@mixin au-font-size($font-size, $line-height: auto, $important: false) {
  @if ($important == true) {
    $important: !important;
  } @else if ($important == false) {
    $important: null;
  } @else {
    @error "`#{$important}` needs to be `true` or `false`.";
  }

  // Set font size in rem
  font-size: #{$font-size} $important;

  @if ($line-height == "auto") {
    line-height: var(--au-global-line-height) $important;
  } @else {
    @if (
      type-of($line-height) ==
        number or
        $line-height ==
        "inherit" or
        $line-height ==
        "normal"
    ) {
      line-height: #{$line-height} $important;
    } @else if ($line-height != "none" and $line-height != false) {
      @error "D’oh! `#{$line-height}` is not a valid value for `$line-height`.";
    }
  }
}
