Skip to content

Instantly share code, notes, and snippets.

@juanjoseijas
Last active January 10, 2018 15:42
Show Gist options
  • Save juanjoseijas/3d772dbc6a266722004d871944610366 to your computer and use it in GitHub Desktop.
Save juanjoseijas/3d772dbc6a266722004d871944610366 to your computer and use it in GitHub Desktop.
Grid with Susy3 + Flexbox
@import "susy/sass/susy";
@import 'susy/sass/plugins/svg-grid/';
$susy: (
'columns': susy-repeat(6),
'gutters': 2em,
'svg-grid-colors': hsla(180, 50%, 50%, 0.25),
);
@mixin grid($debug: false, $config: $susy){
$config: susy-settings($config);
@if $debug {
background: susy-svg-grid($grid: $config) no-repeat scroll;
}
}
.grid {
@include grid($debug: true);
}
.wrap {
display: flex;
justify-content: space-between;
}
@for $span from 1 through length(susy-get('columns')) {
.span-#{$span} {
flex-basis: span($span);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment