3 ms·
It's interesting to now have this, flexbox, and the multi-column module (that I never see anyone talking about). Does anyone know if this can be used for dynam
by TipVFL 9y ago
It's interesting to now have this, flexbox, and the multi-column module (that I never see anyone talking about).
Does anyone know if this can be used for dynamically wrapping columns? Ostensibly flexbox should be able to handle that, but without an explicit height your column will never wrap.
I recently needed to implement dynamically wrapping columns and I was able to get 90% of what I needed from the multi column module. However it seems to be really buggy at this point, it often ended up with elements sliced in half or missing. Also, the biggest issue for me was no way to target the columns and prevent reordering. I had sections of text that could be expanded or collapsed, and that would trigger a complete rearrangement of columns. Nasty.
I ended up coding my own column system for vertical wrapping, and it was so helpful I was thinking about open-sourcing it, but I'm not sure if CSS grid obviates the need.
- kilburn 9y agoAs you found out, the CSS multi-column module is not very well specified, and browser support is severly lacking in both features and performance. Unfortunately... no, there's no better css only alternative. Grids are not supposed to address that use case. For now you are much better off looking at "masonry" javascript implementations, because they actually work and exhibit better performance than css columns.