Created
January 28, 2016 19:40
-
-
Save chaddy81/f852004d6d1510eec1f6 to your computer and use it in GitHub Desktop.
SCSS Grid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment