Sha256: 519c05fe397bc464a808b28234c1340fbbc93ac2c21bf9031f6b7135abd0a079

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

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

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

  $direction: get-direction($layout-direction, $default-layout-direction);
  $opposite-direction: get-opposite-direction($direction);

  @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-#{$direction}: flex-gutter($container-columns);
    width: flex-grid($columns, $container-columns) + flex-gutter($container-columns);

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

  @else {
    display: block;
    float: #{$opposite-direction};
    margin-#{$direction}: flex-gutter($container-columns);
    width: flex-grid($columns, $container-columns);

    &:last-child {
      margin-#{$direction}: 0;
    }
  }
}

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
neat-compass-1.3.0 stylesheets/neat/grid/_span-columns.scss
neat-1.3.0 app/assets/stylesheets/grid/_span-columns.scss