Sha256: 81b8b2a331751484bb5ea89ae0bcb99fcd7ccd0425b1f9e89cc8a75e8b482bfe

Contents?: true

Size: 1.19 KB

Versions: 5

Compression:

Stored size: 1.19 KB

Contents

@mixin span-columns($span: $columns of $container-columns, $display: block) {

  $columns: nth($span, 1);
  $container-columns: container-span($span);
  $display-table: false;

  @if $container-columns != $grid-columns {
    $parent-columns: $container-columns;
  }

  @else {
    $parent-columns: $grid-columns;
  }

  @if $container-display-table == true {
    $display-table: true;
  }

  @else if $display == table {
    $display-table: true;
  }

  @else {
    $display-table: false;
  }

  @if $display-table  {
    display: table-cell;
    padding-right: flex-gutter($container-columns);
    width: flex-grid($columns, $container-columns) + flex-gutter($container-columns);

    &:last-child {
      width: flex-grid($columns, $container-columns);
      padding-right: 0;
    }
  }

  @else if $display == inline-block {
    @include inline-block;
    margin-right: flex-gutter($container-columns);
    width: flex-grid($columns, $container-columns);

    &:last-child {
      margin-right: 0;
    }
  }

  @else {
    display: block;
    float: left;
    margin-right: flex-gutter($container-columns);
    width: flex-grid($columns, $container-columns);

    &:last-child {
      margin-right: 0;
    }
  }
}

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
neat-compass-1.2.1 stylesheets/neat/grid/_span-columns.scss
neat-1.2.1 app/assets/stylesheets/grid/_span-columns.scss
neat-compass-1.2.0.1 stylesheets/neat/grid/_span-columns.scss
neat-compass-1.2.0 stylesheets/neat/grid/_span-columns.scss
neat-1.2.0 app/assets/stylesheets/grid/_span-columns.scss