Sha256: c8cd18012f4fc946469936d61312ba426764c30ec8553251cf7e3edc84790b42

Contents?: true

Size: 853 Bytes

Versions: 1

Compression:

Stored size: 853 Bytes

Contents

@charset "UTF-8";
/// Creates collapsed grid object that consumes the gutters of its container,
/// for use in nested layouts.
///
/// @group features
///
/// @name Grid collapse
///
/// @argument {map} $grid [$neat-grid]
///   The grid used to determine gutter size.
///
/// @example scss
///   .element {
///     @include grid-collapse;
///   }
///
/// @example css
///   .element {
///     float: left;
///     margin-left: -20px;
///     margin-right: -20px;
///     width: calc(100% + 40px);
///   }

@mixin grid-collapse($grid: $neat-grid) {
  $_grid-gutter: _retrieve-neat-setting($grid, gutter);

  @if unit($_grid-gutter) == "%" {
    @warn "`grid-collapse` is not compatible with percentage based gutters.";
  }

  float: left;
  margin-left: -($_grid-gutter);
  margin-right: -($_grid-gutter);
  width: calc(100% + #{($_grid-gutter * 2)});
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
neat-2.0.0.beta.1 core/neat/mixins/_grid-collapse.scss