Sha256: e75270bbc5f553ddbb88c60a3cad61e38e3f36cd10e8a9453b354d21ac652a7e

Contents?: true

Size: 442 Bytes

Versions: 4

Compression:

Stored size: 442 Bytes

Contents

// "Snaps" an asymmetric grid to a symmetric one by including gutters in the grid definitions
// Will only work properly with integer asymmetric grids
@function snap($grid, $gutter) {
  @if not unitless($gutter) {
    @return $grid;
  }

  $holder: ();

  @each $column in $grid {
    $base: $column;
    $gutters: ($base - 1) * $gutter;

    $total: $base + $gutters;

    $holder: append($holder, $total, 'space');
  }

  @return $holder;
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
singularity-extras-1.0.0 stylesheets/singularity-extras/generators/_snap.scss
singularity-extras-1.0.0.alpha.3 stylesheets/singularity-extras/generators/_snap.scss
singularity-extras-1.0.0.alpha.2 stylesheets/singularity-extras/generators/_snap.scss
singularity-extras-1.0.0.alpha.1 stylesheets/singularity-extras/generators/_snap.scss