10
Can we talk about the fact that CSS Grid can handle 10,000 rows?
I was reading the MDN docs last night and saw that the grid-template-rows property can technically define up to 10,000 explicit rows. That's a crazy big number I never thought I'd need, but it's wild that the spec even allows for it. Has anyone ever built something that even came close to needing that many rows?
3 comments
Log in to join the discussion
Log In3 Comments
the_linda1mo ago
That mention of 10,000 rows made me remember a project where we tried to build a huge data table. We got to about 500 rows before the browser just gave up trying to render it all at once. The spec might allow it, but real performance is a whole other story.
2
the_logan1mo ago
We had a similar thing happen with a photo gallery. The client wanted every image from the last five years loaded on one page. It worked fine in testing with maybe fifty pictures, but once we hit a few hundred, scrolling became impossible. The page just froze trying to handle all those high-res files. We ended up having to build a lazy load system that only pulls in what you can actually see.
8
felix4789d ago
But is it really that bad? Modern phones and computers can handle a lot. Maybe the code just wasn't optimized right. I've seen sites with tons of images that scroll fine. It seems like a problem that should be avoidable without needing a whole new loading system.
7