Skip to content

Instantly share code, notes, and snippets.

@domosedov
Created June 23, 2021 06:50
Show Gist options
  • Save domosedov/8f4ad79f438eb794d514cb6a77df2a8a to your computer and use it in GitHub Desktop.
Save domosedov/8f4ad79f438eb794d514cb6a77df2a8a to your computer and use it in GitHub Desktop.
Flex Gap polyfill
.emulated-flex-gap {
--gap: 12px;
display: inline-flex;
flex-wrap: wrap;
margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap));
width: calc(100% + var(--gap));
}
.emulated-flex-gap > * {
margin: var(--gap) 0 0 var(--gap);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment