Skip to content

Instantly share code, notes, and snippets.

@jonespen
Created January 23, 2014 14:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonespen/8579542 to your computer and use it in GitHub Desktop.
Save jonespen/8579542 to your computer and use it in GitHub Desktop.
equal height grid columns using susy and flexbox
@import "susy";
$total-columns : 7;
$column-width : 4em;
$gutter-width : 1em;
$grid-padding : $gutter-width;
$break : 12;
@mixin flex-span-columns($columns, $context: $total-columns, $padding: false, $from: $from-direction, $style: fix-static-misalignment()){
@include span-columns($columns, $context, $padding, $from, $style);
flex: 0 0 columns($columns);
}
body {
@include container($total-columns, $break);
}
ul {
@include at-breakpoint($break){
display: flex;
flex-direction: row;
&.multiple-rows {
flex-wrap: wrap;
}
}
li {
@include at-breakpoint($break){
@include flex-span-columns(4);
&:nth-child(3n){
@include omega;
}
&.large {
@include at-breakpoint($break){
@include flex-span-columns(8);
}
}
}
}
}
@yairEO
Copy link

yairEO commented Apr 19, 2015

what is $grid-padding for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment