Sha256: 899b431b050e82727c858506b33d60e601eb12f3e3f7115d3144a2bce419a826

Contents?: true

Size: 1.78 KB

Versions: 8

Compression:

Stored size: 1.78 KB

Contents

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

////
/// @group grid
////

/// Change the behavior of columns defined inside this mixin to use a different column count.
/// @content
/// @param {Number} $columns - Number of columns to use.
/// @param {Booleam} $root [false]
///   If `false`, selectors inside this mixin will nest inside the parent selector.
///   If `tru`, selectors will not nest.
@mixin grid-context(
  $columns,
  $root: false
) {
  // Store the current column count so it can be re-set later
  $old-grid-column-count: $columns;
  $grid-column-count: $columns !global;

  @if $root {
    @at-root { @content; }
  }
  @else {
    @content;
  }

  // Restore the old column count
  $grid-column-count: $old-grid-column-count !global;
}

/// Creates a grid row.
/// @content
/// @param {Number} $columns [null] - Column count for this row. `null` will use the default column count.
/// @param {Keywords} $behavior [null]
///   Modifications to the default grid styles. `nest` indicates the row will be placed inside another row. `collapse` indicates that the columns inside this row will not have padding. `nest collapse` combines both behaviors.
/// @param {Number} $width [$grid-row-width] - Maximum width of the row.
@mixin grid-row(
  $columns: null,
  $behavior: null,
  $width: $grid-row-width,
  $cf: true
) {
  $behavior: -zf-get-options($behavior, nest collapse);
  $margin: auto;

  @if map-get($behavior, nest) {
    $margin: rem-calc($grid-column-gutter) / 2 * -1;

    @if map-get($behavior, collapse) {
      $margin: 0;
    }
  }
  @else {
    max-width: $width;
  }

  @if $cf {
    @include clearfix;
  }

  margin-left: $margin;
  margin-right: $margin;

  @if $columns != null {
    @include grid-context($columns) {
      @content;
    }
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_wagon-2.4.0.rc2 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.4.0.rc1 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.3.0 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.3.0.rc1 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.2.0 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.2.0.rc3 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.2.0.rc2 generators/foundation/public/stylesheets/foundation6/grid/_row.scss
locomotivecms_wagon-2.2.0.rc1 generators/foundation/public/stylesheets/foundation6/grid/_row.scss