Created
August 20, 2013 11:00
-
-
Save anttti/6280063 to your computer and use it in GitHub Desktop.
Simple SCSS grid system
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
.row { | |
width: 100%; | |
max-width: $document-max-width; | |
margin-left: auto; | |
margin-right: auto; | |
margin-top: 0; | |
margin-bottom: $general-padding; | |
&:before, &:after { | |
content: " "; | |
display: table; | |
} | |
&:after { | |
clear: both; | |
} | |
.row { | |
width: auto; | |
margin-left: -0.9375em; | |
margin-right: -0.9375em; | |
margin-top: 0; | |
margin-bottom: 0; | |
} | |
} | |
.column { | |
position: relative; | |
padding-left: 0.9375em; | |
padding-right: 0.9375em; | |
width: 100%; | |
float: left; | |
} | |
[class*="column"] + [class*="column"]:last-child { | |
float: right; | |
} | |
[class*="column"] + [class*="column"].end { | |
float: left; | |
} | |
[class^="grid-units"] { | |
position: relative; | |
} | |
@for $i from 1 to 11 { | |
.grid-units-#{$i} { | |
width: $i * 8.33333%; | |
} | |
.grid-units-offset-#{$i} { | |
margin-left: $i * 8.33333%; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simplified from Foundation