/// Apply vertical paddings that are multiples of the base line height.
///
/// A top and bottom padding can be defined, as numbers without any unit.
/// When not specified, each padding will be set to zero.
///
/// @group typography
///
/// @parameter {Map} $padding    - a map with a top and/or bottom attributes
///
/// @example scss - Usage
///   $k-typography: (
///     line-height: 1.5rem,
///     ...
///   );
///
///   $paddings: (
///     top:    1,
///     bottom: 2
///   );
///
///   @include k-typographyVerticalPadding($paddings);
///
/// @example css - CSS output
///   padding-top:    1.5rem;
///   padding-bottom: 3rem;
@mixin k-typographyVerticalPadding($paddings) {
  $valid:
    k-all(
      k-validate(
        $padding, $k-vertical-padding-schema,
        'k-typographyPadding', '$distance'
      )
    );

  // The base line height.
  $base-line-height: k-map-fetch($k-typography, 'line-height');

  // Get top padding or set to 0.
  $top-padding: k-default(map-get($paddings, 'top'), 0);

  // Get bottom padding or set to 0.
  $bottom-padding: k-default(map-get($paddings, 'bottom'), 0);

  padding-top: $top-padding * $base-line-height;
  padding-bottom: $bottom-padding * $base-line-height;
}
