- From: Michael via GitHub <sysbot+gh@w3.org>
- Date: Sat, 20 Apr 2024 15:21:56 +0000
- To: public-css-archive@w3.org
We recently implemented a masonry grid as part of our website's dashboard, which held a list of infinite-scrolling cards, and we opted to use CSS Grid for it because we wanted control over the columns (using `grid-template-columns: repeat(auto-fill, ...)`) like you mentioned. For the rows, for now, we used a bit of JS to give them all a `grid-row: span ...` based on each childs height. It's definitely something I'd love to have to be able to progressively enhance this behaviour and remove the need for JS. It would also be much easier to progressively enhance too in grid. Just add a `grid-template-rows: masonry`, if it's not supported, no problem, we get the default grid row generation with cards stretching to fit, which is what I would want as the fallback. Whereas with `display: masonry`, that would require an `@supports`. -- GitHub Notification of comment by michaeltugby0 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10233#issuecomment-2067705806 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 20 April 2024 15:21:57 UTC