Skip to content

Instantly share code, notes, and snippets.

@mrmurphy
Forked from anonymous/Columns Mixin
Last active December 20, 2015 12:59
Show Gist options
  • Save mrmurphy/6134912 to your computer and use it in GitHub Desktop.
Save mrmurphy/6134912 to your computer and use it in GitHub Desktop.
@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);
@if $clear != 0 {
margin-right: ($clear * flex-gutter()) + flex-grid($clear);
}
}
// 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