Last active
August 29, 2015 14:03
-
-
Save ademilter/024c544938b89c6280e4 to your computer and use it in GitHub Desktop.
_grid.scss
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
$width-Container: 1200px; | |
$gutter-Row: 15px; | |
.Container { | |
max-width: $width-Container + $gutter-Row * 2; | |
margin-right: auto; | |
margin-left: auto; | |
padding-right: $gutter-Row; | |
padding-left: $gutter-Row; | |
} | |
.Row { | |
display: block; | |
font-size: 0; | |
text-align: left; | |
&#{--center} { | |
text-align: center; | |
} | |
&#{--right} { | |
text-align: right; | |
} | |
&#{--widthGutter} { | |
margin-right: -$gutter-Row; | |
margin-left: -$gutter-Row; | |
} | |
} | |
.Cell { | |
display: inline-block; | |
font-size: 1rem; | |
text-align: left; | |
width: 100%; | |
vertical-align: top; | |
.Row--widthGutter & { | |
padding-right: $gutter-Row; | |
padding-left: $gutter-Row; | |
} | |
&#{--Center} { | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
} | |
@for $i from 1 through 12 { | |
@for $j from 1 through 12 { | |
@if $i < $j { | |
.u-#{$i}of#{$j} { | |
width: 100% * $i / $j !important; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment