Sha256: 7471b2942e17f146c57419826c96ab5880da1ebf7bdb6d2acbd23e1245ffd3d7

Contents?: true

Size: 1.78 KB

Versions: 12

Compression:

Stored size: 1.78 KB

Contents

// Block Grid
// Technique adapted from Foundation 5 for Bootstrap 3.
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM)
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme)
 
[class*="block-grid-"] {
  display: block;
  margin: -($grid-gutter-width/2);
  padding: 0;
  @include clearfix();
}
 
.block-grid-item {
  display: inline;
  margin: 0;
  padding: ($grid-gutter-width/2);
  height: auto;
  float: left;
  list-style: none;
}
 
@mixin block-grid ($per-row) {
  & > .block-grid-item {
    width: (100%/$per-row);
 
    $nth-equation: #{$per-row}n+'+'+1;
    &:nth-of-type(n) { clear: none; }
    &:nth-of-type(#{$nth-equation}) { clear: both; }
  }
}
 
@mixin block-grids($size) {
  .block-grid-#{$size}-1  { @include block-grid(1);  }
  .block-grid-#{$size}-2  { @include block-grid(2);  }
  .block-grid-#{$size}-3  { @include block-grid(3);  }
  .block-grid-#{$size}-4  { @include block-grid(4);  }
  .block-grid-#{$size}-5  { @include block-grid(5);  }
  .block-grid-#{$size}-6  { @include block-grid(6);  }
  .block-grid-#{$size}-7  { @include block-grid(7);  }
  .block-grid-#{$size}-8  { @include block-grid(8);  }
  .block-grid-#{$size}-9  { @include block-grid(9);  }
  .block-grid-#{$size}-10 { @include block-grid(10); }
  .block-grid-#{$size}-11 { @include block-grid(11); }
  .block-grid-#{$size}-12 { @include block-grid(12); }
}
 
@include block-grids(xs); 
@media (min-width: $screen-sm) { @include block-grids(sm) }
@media (min-width: $screen-md) { @include block-grids(md) }
@media (min-width: $screen-lg) { @include block-grids(lg) }

@media  (min-width: $screen-xs) and (max-width: $screen-xs-max) { @include block-grids(ls) }

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
iasd-bootstrap-sass-1.7.11 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.7.10 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.7.9 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.7.8 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.7.2 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.7.1 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.7.0 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.6.4 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.6.3 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.6.2 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.6.1 stylesheets/_iasd-block-grid.scss
iasd-bootstrap-sass-1.6.0 stylesheets/_iasd-block-grid.scss