Sha256: 5265cedc8289a682d39d348fb6bd8055fbc38ba64688347fc38cadea4d8cd488

Contents?: true

Size: 963 Bytes

Versions: 1

Compression:

Stored size: 963 Bytes

Contents

@charset "UTF-8";
/// Push or pull a Neat grid column by manipulating its left margin.
///
/// @group features
///
/// @name Grid push
///
/// @argument {number (unitless)} $push [false]
///
/// @argument {map} $grid [$neat-grid]
///   The grid to be used to generate the column.
///   By default, the global `$neat-grid` will be used.
///
/// @example scss
///   .element {
///     @include grid-push(3);
///   }
///
/// @example css
///   .element {
///     margin-left: calc(25% - 25px + 40px);
///   }

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

  @if $push {
    $_gutter-affordance: $_grid-gutter * 2;
    $_margin-value: calc(#{_neat-column-width($grid, $push)} + #{$_gutter-affordance});
    margin-left: $_margin-value;
  } @else {
    $_margin-value: _retrieve-neat-setting($grid, gutter);
    margin-left: $_margin-value;
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

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