Skip to content

Instantly share code, notes, and snippets.

@greghesp
Last active December 24, 2022 19:36
Show Gist options
  • Save greghesp/c840ac20bc2201d7e68734aa13c64d46 to your computer and use it in GitHub Desktop.
Save greghesp/c840ac20bc2201d7e68734aa13c64d46 to your computer and use it in GitHub Desktop.
Tailwind Flex Wrap with Row spacing
// Apply negative value to the items you want to add to each child
// In this example, the first row and last items to the right will have the overlap the negative values to create the effect of them not being there
<div class="flex flex-wrap -mt-2 -mr-2">
// forEach, map etc
// Apply a positive value to the items you want to add to each child.
<div class="mt-2 mr-2">Loop Item</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment