Skip to content

Instantly share code, notes, and snippets.

@chodorowicz
Created June 16, 2016 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chodorowicz/ac363a8411f7a8cdaa38c61f439100aa to your computer and use it in GitHub Desktop.
Save chodorowicz/ac363a8411f7a8cdaa38c61f439100aa to your computer and use it in GitHub Desktop.
isotope fitRows example
/**
* 20px gutter between columns
* using imagesLoaded
**/
const $grid = $('.js-features');
$grid.imagesLoaded(() => {
$grid.isotope({
filter: '.b2b',
itemSelector: '.js-featuresItem',
layoutMode: 'fitRows',
fitRows: {
gutter: 20,
}
});
})
/**
* 5 columns, fill whole container
**/
.gridItemContainer {
width: calc(20% - 4/5 * 20px); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment