When there are no classes on the grid items (the immediate children of a.grid), each grid item will automatically be sized to one column.
This behavior can be mixed with grid column classes.
Compare that to this two column layout at all viewports.
Change the vertical gaps only by modifying the rowGap. Note that we use gap on.grids, but rowGap and column-gapcan be modified as needed.
Because of that, you can have different vertical and horizontal gaps, which can take a single value (all sides) or a pair of values (vertical and horizontal). This can be applied with an inline style for gap, or with our --bs-gap CSS variable.
Variable | Fallback value | Description |
---|---|---|
--bs-rows | 1 | The number of rows in your grid template |
--bs-columns | 12 | The number of columns in your grid template |
--bs-gap | 1.5rem | The size of the gap between columns (vertical and horizontal) |