No Gap (default)
Item 1
Item 2
Item 3
Item 4
See how the gap
property creates consistent spacing between flex
items. Much cleaner than using margins and automatically handles spacing in all directions.
Clean spacing without manual margins
Gap property handles all the spacing
Perfect for responsive card layouts
No margin calculations needed
gap
creates consistent spacing between flex items automaticallygap: 1rem
- Same spacing in both directionsrow-gap: 0.5rem
- Vertical spacing onlycolumn-gap: 1rem
- Horizontal spacing onlygap: 1rem 2rem
- Shorthand for row-gap column-gap