DrewDahlman / Mason

Mason.js for creating a perfect grid with jQuery.
http://masonjs.com/
MIT License
1.22k stars 183 forks source link

Responsive layout #37

Closed kybarg closed 9 years ago

kybarg commented 9 years ago

I suggest not to change number of columns according to the viewport width. Isn't it better to change item proportions if viewport width changes? I imagine it like Bootstrap columns, but allow user to change height too. For example:

    $(".js-mason").mason({
        itemSelector: ".item",
        columns: 12,
        prefixes: [
              [0,767,'xs-'],
              [768,920,'sm-'],
              [921,1200,'md-'],
              [1200,999999,'lg-'],
        ],
    });
<div class="item col-xs-12 row-xs-6 col-md-6 row-md-3"></div>
DrewDahlman commented 9 years ago

Columns have to change due to the nature of Mason. It calculates everything around there being columns. Sizes can be tweaked based around the ratio that is provided.