Skip to content

Instantly share code, notes, and snippets.

@mtrythall
Last active December 29, 2015 00:59
Show Gist options
  • Save mtrythall/7590064 to your computer and use it in GitHub Desktop.
Save mtrythall/7590064 to your computer and use it in GitHub Desktop.
Grid helpers that wrap Susy
/*
* Class-based Grid
*/
.grid-row {
@include clear; // Insert your clearfix here
}
.grid-last {
@include omega;
}
@for $i from 1 through 10 {
.grid-#{$i} {
@include span-columns($i, 10);
}
}
// Columns of empty space as padding *before*
@for $i from 1 to 12 {
.grid-prefix-#{$i} {
@include prefix($i);
}
}
// Columns of empty space as padding *after*
@for $i from 1 to 12 {
.grid-suffix-#{$i} {
@include suffix($i);
}
}
// Columns of empty space as margin *before*
@for $i from 1 to 12 {
.grid-pre-#{$i} {
@include pre($i);
}
}
// Columns of empty space as margin *after*
@for $i from 1 to 12 {
.grid-post-#{$i} {
@include post($i);
}
}
// Add negative margins before an element
@for $i from 1 to 12 {
.grid-pull-#{$i} {
@include pull($i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment