Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$gap-horizontal: 10px;
$gap-vertical: $gap-horizontal;
@mixin grid {
// fallback for IE
&::before, &::after {
content: '';
display: table;
}
&::after {
clear: both;
}
> * {
float: left;
margin-right: $gap-horizontal;
margin-bottom: $gap-vertical;
}
@supports(grid-area: auto) {
//CSS Grid style
display: grid;
grid-column-gap: $gap-horizontal;
grid-row-gap: $gap-vertical;
&::after, &::before {
content: none;
}
> * {
margin-right: 0;
margin-bottom: 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment