Created
June 5, 2013 10:26
-
-
Save javorszky/5712973 to your computer and use it in GitHub Desktop.
960.gs is an awesome starter grid. Sadly it's content box... so I've made it play nice with border-box
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: 960px | |
$cols: 12 | |
$gutter: 16px | |
@mixin clearfix-micro() | |
& | |
*zoom: 1 | |
&:before, | |
&:after | |
content: "" | |
display: table | |
&:after | |
clear: both | |
%rows | |
padding-left: $gutter / 2 | |
padding-right: $gutter / 2 | |
float: left | |
min-height: 1px | |
%pushpull | |
position: relative | |
* | |
-moz-box-sizing: border-box | |
-webkit-box-sizing: border-box | |
box-sizing: border-box | |
.row | |
+clearfix-micro | |
margin: 0 auto | |
width: $width | |
@for $i from 1 through $cols | |
.grid_#{$i} | |
width: ( $width / $cols ) * $i | |
@extend %rows | |
.push_#{$i} | |
@extend %pushpull | |
left: ( $width / $cols ) * $i | |
.pull_#{$i} | |
@extend %pushpull | |
left: -( ( $width / $cols ) * $i ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey!
I tried to compile it here and there. But i always get syntax errors. I never worked with SASS so i can´t debug.
Do you have a hint for me maybe?