desandro / masonry

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

Masonry only layouts some elements #1069

Closed TheNeikos closed 5 years ago

TheNeikos commented 5 years ago

Heya! Thanks for this great library! Unluckily I seem to have struck a form of edge case, and I am not sure how to reproduce it on its own.

The problem is that masonry only layouts some of the elements and doesn't seem to touch the others at all.

image

However this only happens when the images are cached, on first load it works fine:

image

This made me thing that maybe I was calling 'layout' too fast, but testing in a codepen wasn't fruitful.

However, I do not understand how they get no positioning assigned, which makes me think that maybe it could be a bug?

I have been trying the past hours to reproduce this on its own, but to no avail. Have you seen something like this happen before? I'd be happy about pointers to resolve this.

Thanks!


Some more context that could be helpful:

<div class="columns">
    <div class="column is-full-mobile is-half-tablet is-one-third-widescreen" style="position: absolute; left: 0%; top: 0px;">
      <!-- Non zero-height and width, with an image with varying height for each column -->
    </div>
</div>
desandro commented 5 years ago

I'm sorry to see you're having trouble with Masonry. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.