Sha256: ff67794acaf939ab3fe15aa7570a6b8a789cfb914b8885792015c649452d0535

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group xy-grid
////

/// Create gutters for a cell/container.
///
/// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters.
/// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts either margin or padding.
/// @param {List} $gutter-position [right left] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination.
/// @param {Boolean} $negative [false] - Whether to apply the gutter as a negative value. Commonly used for nested grids.
@mixin xy-gutters(
  $gutters: $grid-margin-gutters,
  $gutter-type: margin,
  $gutter-position: right left,
  $negative: false
) {
  $operator: if($negative, '-', '');

  // If we have declared negative gutters, force type to `margin.
  $gutter-type: if($negative, 'margin', $gutter-type);

  // Output our margin gutters.
  @if (type-of($gutters) == 'map') {
    @include -zf-breakpoint-value(auto, $gutters) {
      $gutter: rem-calc($-zf-bp-value) / 2;

      // Loop through each gutter position
      @each $value in $gutter-position {
        #{$gutter-type}-#{$value}: unquote("#{$operator}#{$gutter}");
      }
    }
  }
  @elseif (type-of($gutters) == 'number') {
    $gutter: rem-calc($gutters) / 2;

    // Loop through each gutter position
    @each $value in $gutter-position {
      #{$gutter-type}-#{$value}: unquote("#{$operator}#{$gutter}");
    }
  }
}

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
foundation-rails-6.4.3.0 vendor/assets/scss/xy-grid/_gutters.scss
jekyll-theme-foundation-0.3.6 _sass/scss/xy-grid/_gutters.scss
jekyll-theme-foundation-0.3.5 _sass/scss/xy-grid/_gutters.scss
jekyll-theme-foundation-0.2.5 _sass/scss/xy-grid/_gutters.scss