If there's native CSS masonry support in browsers, it would look like this. Only Safari Technology Preview supports it now https://caniuse.com/?search=masonry
Code looks like this:
```
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-template-rows: masonry;
masonry-auto-flow: pack;
gap: 2px;
```