attila / savvior

A Salvattore and Masonry alternative without CSS-driven configuration or absolute CSS positioning

Home Page:http://savvior.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong column count if resizing from big to small width

vlad00777 opened this issue · comments

commented

Hi. I creating demo on codepen: http://codepen.io/anon/pen/ZKELEj
You can seen this bug if resizing window.

Hi there, thanks for trying out savvior! I confirm this is not a bug. You will need to define your media queries more explicit as this won't cascade like CSS. Try:

savvior.init(".insideBlock_newsList", {
  'screen and (min-width: 1201px)': { columns: 3 },
  'screen and (min-width: 800px) and (max-width: 1200px)': { columns: 2 },
  'screen and (max-width: 799px)': { columns: 1 }
});