Skip to content

Instantly share code, notes, and snippets.

@mattbanks
Created April 4, 2016 19:56
Show Gist options
  • Save mattbanks/08a53c9bcf45de2a5609c588aaaf7110 to your computer and use it in GitHub Desktop.
Save mattbanks/08a53c9bcf45de2a5609c588aaaf7110 to your computer and use it in GitHub Desktop.
/* ==========================================================================
Grid
========================================================================== */
$pad: 20px;
.grid {
margin: 0 0 $pad 0;
@include clearfix();
}
[class*='col-'] {
float: left;
padding-right: $pad;
.grid &:last-of-type {
padding-right: 0;
}
}
.col-1-2 {
width: 50%;
}
.col-1-3 {
width: 33.33%;
}
.col-2-3 {
width: 66.66%;
}
.col-1-4 {
width: 25%;
}
.col-3-4 {
width: 75%;
}
.col-1-8 {
width: 12.5%;
}
.col-7-8 {
width: 87.5%;
}
.module {
padding: $pad;
}
/* Opt-in outside padding */
.grid-pad {
padding: $pad 0 $pad $pad;
[class*='col-']:last-of-type {
padding-right: $pad;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment