Last active
January 10, 2018 15:42
-
-
Save juanjoseijas/3d772dbc6a266722004d871944610366 to your computer and use it in GitHub Desktop.
Grid with Susy3 + Flexbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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