Hello there,
I am in the process of creating an image gallery using CSS grid. Specifically, my goal is to initially show just one row of images and then allow users to click a "Show more" button to reveal additional images.
You can see my progress here: https://stackblitz.com/edit/angular-96bdii?file=src%2Fapp%2Fgallery.component.ts
The issue I'm facing is that real images take longer to load completely compared to colored divs. This causes problems with the ngViewAfterInit hack since the total width isn't accurate when it's called. Additionally, the total width is calculated automatically by a flexbox layout, making it difficult to predict early on.
Do you have any suggestions for a better solution that utilizes advanced CSS grid techniques to limit the display to just one row?
Thank you for your help!