I am facing some problem with CSS flexbox gap. Why it is not working on iPhone?
Here's my code
<div className="flex flex-col gap-2">
I am facing some problem with CSS flexbox gap. Why it is not working on iPhone?
Here's my code
<div className="flex flex-col gap-2">
You can achieve spacing on Tailwind flexbox with space-
classes.
<div className="flex flex-col space-x-4">
By the way; applying gap
class names on Tailwind flexbox is not a generic method. Gap sizing works only with grid
containers.
<div className="grid gap-1 grid-cols-2">
space between
notation on flexbox elements. Space Between - Tailwind
space between
works. tailwindcss.com/docs/space
Dec 1, 2020 at 6:52
Currently, 'space-' is the best workaround for replacing gaps however you only need to do that for your flex gaps, grid gaps work perfectly fine on iOS, so if you are going to refactor you don't have to refactor your grids at least.