desandro / masonry

:love_hotel: Cascading grid layout plugin
https://masonry.desandro.com
16.27k stars 2.11k forks source link

Specifying gutter in HTML data-masonry attribute isn't respected #1175

Open sosherof opened 1 year ago

sosherof commented 1 year ago

When auto-initializing via the data-masonry attribute, the gutter option doesn't seem to work. See my code pen where I've specified the gutter in the attribute. When you resize, the space between tiles seems to be random, sometimes zero space.

In my code pen, comment out the first call to masonry and uncomment the second where the gutter is passed as an option in the call. That works fine.

https://codepen.io/osheros/pen/WNJOQJd