Created
August 4, 2014 18:35
-
-
Save iCodeForBananas/ea2d50033edb31332b20 to your computer and use it in GitHub Desktop.
Simplistic 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
.grid { | |
margin: 0 0 20px 0; | |
} | |
.grid:after { | |
/* Or @extend clearfix */ | |
content: ""; | |
display: table; | |
clear: both; | |
} | |
[class*='col-'] { | |
float: left; | |
padding-right: 20px; | |
} | |
.grid [class*='col-']:last-of-type { | |
padding-right: 0; | |
} | |
.col-2-3 { width: 66.66%; } | |
.col-1-3 { width: 33.33%; } | |
.col-1-2 { width: 50%; } | |
.col-1-4 { width: 25%; } | |
.col-1-8 { width: 12.5%; } | |
.col-2-8 { width: 25%; } | |
.col-3-8 { width: 37.5%; } | |
.col-5-8 { width: 62.5%; } | |
.col-2-12 { width: 16.6666666666666%; } | |
.col-3-12 { width: 25%; } | |
.col-4-12 { width: 33.3333333333333%; } | |
.col-5-12 { width: 41.6666666666666%; } | |
.col-6-12 { width: 50%; } | |
.col-8-12 { width: 66.6666666666666%; } | |
.col-9-12 { width: 75%; } | |
/* Opt-in outside padding */ | |
.grid-pad { | |
padding: 20px 0 20px 20px; | |
} | |
.grid-pad [class*='col-']:last-of-type { | |
padding-right: 20px; | |
} | |
.module { | |
padding: 20px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment