Skip to content

Instantly share code, notes, and snippets.

@chaddy81
Created January 28, 2016 19:40
Show Gist options
  • Save chaddy81/f852004d6d1510eec1f6 to your computer and use it in GitHub Desktop.
Save chaddy81/f852004d6d1510eec1f6 to your computer and use it in GitHub Desktop.

Revisions

  1. chaddy81 created this gist Jan 28, 2016.
    29 changes: 29 additions & 0 deletions scss_grid.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    $columns: 12 !default;
    $gutter: 30px !default;
    $max-width: 1170px;

    .grid {
    margin: 0px auto;
    max-width: $max-width;
    width: 100%;
    }

    .grid__row {
    margin-left: -$gutter/2;
    margin-right: -$gutter/2;
    width: 100%;

    @extend .clearfix;
    }

    @for $i from 1 through $columns {

    .grid__unit--#{$i} {
    float: left;
    min-height: 1px;
    padding: 0 $gutter/2;
    position: relative;
    width: percentage( $i / $columns );
    }

    }