Auto nth-of-type for grid cell (divider)

Hi bricks team.

When creating a product grid or product category grid, sometimes there is a need to have a border between each cell. Like the picture below.

Now we can adjust the amount of border for each cell to achieve this goal. But this solution does not seem optimal.
I don’t know if this is possible, but it would be great if you could add the ability to enable the divider so that we can add a border between the cells regularly. I hope it is possible.

1 Like

You could use a gap instead, then set the background to grey so it looks like a grey border.

For eg set a 2px gap, set the grid background to grey, then set the background of the items in the grid to white.

Much less CSS and is much more flexible in terms of not worrying about nth items with different layouts across breakpoints.

eg background gap

edit - just noticed this was a feature request, not a how-to, leaving it here incase anybody finds it useful though.

6 Likes