If you have large space on both the sides, would you treat it like two extra columns in grid? or just as margins? Does it matter?

Posted Aug 30, 2022, 3:14 AM UTC

14
lamb_pudding•

Margin. If it were grid you’d have to somehow shift your content 1 column over. Sure you could do it wi1 more line of CSS but at that point it’s a bit of a hack IMO.

1
besthelloworld•

If you're using display flex or grid, you should use the gap property

1
WillFry•

I believe that gap will only add space between grid columns/flex items, not at the end of the grid/flexbox.

2
besthelloworld•

Oh yeah, you're right!

1