Is there a smarter way to do this?
Is there a smarter way to do this? https://codepen.io/Lko3001/pen/zYXRqjo
I want the items inside of
.item
to wrap when there's not enough space, and I want the button to grow when it's wrapped.
And also, is there a way to make them all wrap if one does? I think subgrid might help but i'm not sure how to make them wrap
I'm trying to achieve everything without media queries if possible2 Replies
If you don't mind them wrapping at different sizes, because of the longer or shorter paragraphs, this is perfect.
If you want them all to change at the same point, then you'd need to use grid.
For it to wrap with grid, you'd have to use
repeat(auto-fit, minmax()
, and I don't think there's a way to make the minmax() work with intrinsic values.Thanks