/// Apply a font scale using according to media view.
///
/// `font-step` will be computed directly using the modular scale. It is optional
/// and set to 0 by default the regular font step.
///
/// `font-step-on-media` is optional. If it is not defined, it will be set to the
/// regular font step.
///
/// `media-size` will be computed directly using the modular scale. It is
/// optional and is set to media 's' by default. It's the minimum media size
/// from where a specified font step has to be applied.
///
/// `line-height` is optional. If it is not defined, it will be set with default
/// line height computed in font size mixin.
///
/// `line-height-on-media` is optional and set to line-height value if not
/// defined. It will be applied only if the minimum media size is reached.
///
/// @group typography
///
/// @parameter {Number} $font-step                   - the modular scale step to compute
/// @parameter {Number} $font-step-on-media [null]   - the font step on the media specified by $media-size
/// @parameter {String} $media-size ['s']            - the minimum media to be considered as large
/// @parameter {Number} $line-height [null]          - the regular line height to be set
/// @parameter {Number} $line-height-on-media [null] - the line height to be considered as large
///
/// @example scss - Usage
///   $k-typography: (
///     font-size:   1rem,
///     line-height: 1.5rem,
///     scale-multiplier: 1.618
///     ...
///   );
///
///   $k-media-queries: (
///     s: (
///       min-width: 640px,
///       max-width: 767px,
///     ),
///   );
///
///   @include k-typographyFontScale(
///     $font-step: 0,
///     $font-step-on-media: null,
///     $media-size: 's',
///     $line-height: null
///   );
///
/// @example css - CSS output
///   font-size:   4.236rem;
///   line-height: 4.5rem;

@mixin k-typographyFontScale($font-step: 0,
                             $font-step-on-media: null,
                             $media-size: 's',
                             $line-height: null,
                             $line-height-on-media: null) {
  @include k-typographyFontSize($font-step, $line-height);

  @if $font-step-on-media {
    $line-height-on-media: $line-height !default;
    @include k-media-min($media-size) {
      @include k-typographyFontSize($font-step-on-media,
                                    $line-height-on-media);
    }
  }
}
