I just wanted to share this, because I’ve been tearing my hair out trying to solve a problem with grid items becoming a fixed size as the viewport decreases. It was as if they had a minimum width set, but they didn’t. Eventually last night I understood what is happening.
If you have column and/or row gaps set for your grid, they apply to every single column and/or row, even if your grid items span multiple columns or rows. That makes sense, but it’s also easy to be caught out by it, as I was.
So, if you have a four column grid, and each of your grid items fills one column, you’ll just get gaps between your items. But if you’re trying to be clever and have, say, a twelve column grid (so you can move between three and four columns, with your items spanning four or three columns each) you’ll get a grid gap between every one of those twelve columns, and not just between your three or four cards. You won’t see these gaps, but they’ll affect the behaviour of your page. And they’ll amalgamate to create a minimum width for your grid items (with twelve columns and a grid gap of 32px, this will be 96px for an item that spans three columns and 128px for an item that spans four). If you’re trying to be far too clever and want, say, a sixty column grid (so that you can have two, three, four, five, six, ten and twelve column options), well, then you just can’t have gaps. At all!
My takeaway from this is, for page layout — where you likely want gaps between items — go for the minimum number of columns you need. If there are four columns, go for a four column grid. An if you need to change to three, insert a three column grid. Either that, or use a column to space between grid items, and set no gaps at all (which might actually be a better option, since columns can be set to fixed and flexible widths, but unlike gaps these only apply to themselves).