Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@mixin gridAuto($min-width, $fallback: 3) {
> * {
float: left;
width: calc(100%/#{$fallback} - #{$gap-horizontal});
&:nth-child(#{$fallback}n + 1) {
clear: both;
}
}
@supports(grid-area: auto) {
grid-template-columns: repeat(auto-fit, minmax($min-width, 1fr));
> * {
width: auto;
margin: 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment