I would like to know if there is any way to have materializecss cards in a masonry-like display. I would like to avoid plugins like masonry, or having to compile sass, because this will be used on an aurelia application, and the configuration of external libraries and such pains me dearly.
The closest thing I have come across is this: http://codepen.io/mike-north/pen/MwVoYp?editors=1100, which does so through:
.cards-container {
column-break-inside: avoid;
.card {
display: inline-block;
overflow: visible;
}
}
Alas, I have been unable to get it to work using a sass to css compiler. The problem is the card reveals are broken, such as can be seen in this picture. Other methods I have tried result in the same: broken cards. Any help will be appreciated.
I decided to go a different route.
I copied the grid scss file to a new one called masonry, in that file converted
.row
to.card-container
and.col
to .card
removed stuff that pertained only to grids, tweaked the margins and now I can applys{val}
to any card within a card-container class and get the same effect as with columns.Not sure if this will be perfect for you, but it does provide nice cards that flow and works great as far I can tell so far.
Here is the scss here:
just compile it as normal after your cards scss
Hope it helps someone.
LOOK AT this man this is working yayayayayay.....