Created
July 20, 2018 10:18
-
-
Save claudia-romano/e688d514dc2b5ad3d84be87468e1271c to your computer and use it in GitHub Desktop.
This file contains 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
$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