Masonry demo (by dairycultist)
Github repo.
- There is only one function you need to run, which only needs to run once (on page load). CSS flexbox logic handles the rest!
- The function takes in the container (either its ID or the object itself) and the minimum height a row can be in pixels.
- This is solely a horizontal (DeviantArt-like) masonry, not a vertical (Pinterest-like) masonry.
- Only img elements work as masonry items right now, which is all I needed it for, but which can be easily patched.