Using Gap in CSS Grid
The gap (previously called grid-gap) property in CSS Grid is used to create consistent spacing between grid rows and columns without adding extra margins to grid items.
Defines the space between rows and columns in a grid layout.
Can be specified as a single value (applies to both rows and columns) or two values (row-gap and column-gap).
Improves readability and layout consistency by avoiding manual spacing on individual grid items.
Works in both CSS Grid and Flexbox (as gap in Flexbox).
Example: gap: 20px; adds 20px spacing between all rows and columns.