Skip to content

Instantly share code, notes, and snippets.

Created August 1, 2013 20:22
Show Gist options
  • Save anonymous/6134894 to your computer and use it in GitHub Desktop.
Save anonymous/6134894 to your computer and use it in GitHub Desktop.
A convenience class built upon Bourbon Neat. Use this to set up a column in one line. See usage example below.
@mixin columns ($span: $cols of $cont-cols after $shift clearing $clear, $display: block ) {
$cols: nth($span, 1);
$cont-cols: nth($span, 3);
$shift: nth($span, 5);
$clear: nth($span, 7);
@include span-columns( $cols of $cont-cols, $display );
@include shift($shift);
margin-right: ($shift * flex-gutter()) + flex-grid($shift);
}
// This will make the div 6 columns wide, with 3 columns of padding on either side.
foo {
@include columns ( 6 of 12 after 3 clearing 3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment