SU-SWS/decanter

View on GitHub
core/src/scss/utilities/mixins/grid/_grid-gap.scss

Summary

Maintainability
Test Coverage

///
/// Mixin to render cssGrid column gaps in all modern browsers, including IE11.
///
/// @name grid-gap
///
/// @param {unit|string} $gap -  A unit of space for the column gap between columns.
///
/// @group mixin
@mixin grid-gap($gap: $su-gutter-xs) {

  /// If the caller passes in a breakpoint shortcode eg: xs, sm, md, etc
  /// return back the appropriate gap from the global map.
  @if is-length($gap) == false {
    @if map-has-key($su-grid-gutters, $gap) {
      $gap: map-get($su-grid-gutters, $gap);
    }
  }

  @include grid-column-gap($gap);
  @include grid-row-gap($gap);
}