I had to build a video gallery similar to the one ZOOM has for a video-conferencing app.
I've spent quite a bit of time trying to figure out how to build it with pure CSS and I... FAILED π
In the end I solved it with a bit of JavaScript. I documeneted my original solution here.
Later, for fun, I tried to build it with experimental CSS Layout API. Working result is in this repository.
To see it an action make sure to enable experimental web platform features in chrome or firefox.
Resources that helped me: