I'm using Susy grid. I need to make a gallery of blocks with alternate widths. They will be 1/3, 2/3 and 3/3 width blocks. There can be many of these blocks on a page and they can go in a random order. If a block doesn't fit on a single line it must jump to the next line.
<div class="gallery"
<div class="item1of3">...</div>
<div class="item1of3">...</div>
<div class="item1of3">...</div>
<div class="item2of3">...</div>
<div class="item1of3">...</div>
<div class="item3of3">...</div>
<div class="item1of3">...</div>
<div class="item2of3">...</div>
<div class="item2of3">...</div>
</div>
The next code does not help...
.item1of3 {
@include gallery(1 of 3);
}
.item2of3 {
@include gallery(2 of 3);
}
.item3of3 {
@include gallery(3 of 3);
}
because the gallery mixin works for identical elements only. http://codepen.io/inliner/pen/YXWRRp
So is it actually possible?
I need something like this - http://codepen.io/anon/pen/vOKQbx But with the right way to deal with margins. The blocks must be justified within container.