{"action":"created","issue":{"url":"https://api.github.com/repos/desandro/masonry/issues/840","repository_url":"https://api.github.com/repos/desandro/masonry","labels_url":"https://api.github.com/repos/desandro/masonry/issues/840/labels{/name}","comments_url":"https://api.github.com/repos/desandro/masonry/issues/840/comments","events_url":"https://api.github.com/repos/desandro/masonry/issues/840/events","html_url":"https://github.com/desandro/masonry/issues/840","id":141346401,"number":840,"title":"Set bottom margin using Masonry","user":{"login":"lougreenwood","id":12051736,"avatar_url":"https://avatars.githubusercontent.com/u/12051736?v=3","gravatar_id":"","url":"https://api.github.com/users/lougreenwood","html_url":"https://github.com/lougreenwood","followers_url":"https://api.github.com/users/lougreenwood/followers","following_url":"https://api.github.com/users/lougreenwood/following{/other_user}","gists_url":"https://api.github.com/users/lougreenwood/gists{/gist_id}","starred_url":"https://api.github.com/users/lougreenwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lougreenwood/subscriptions","organizations_url":"https://api.github.com/users/lougreenwood/orgs","repos_url":"https://api.github.com/users/lougreenwood/repos","events_url":"https://api.github.com/users/lougreenwood/events{/privacy}","received_events_url":"https://api.github.com/users/lougreenwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-16T17:33:11Z","updated_at":"2016-03-16T18:22:46Z","closed_at":null,"body":"Hi, thanks for the great library!\r\n\r\nI know that the current docs state that any bottom margins should be handled by CSS, however I'm having some difficulty making this square with OOCSS/BEM CSS methodologies.\r\n\r\nThese methodologies dictate that css 'objects' (a Masonry item in this case) should be re-usable anywhere on a page, one re-percussion of this is that an object shouldn't set it's own margins as this can break the flow of the page layout, in these cases, any margins or layout are usually handled by a containing div, for example: http://codepen.io/anon/pen/vGgNNo\r\n\r\nI've tried setting the bottom margin on the containing div, this works fine when masonry is not enabled, but as soon as I enable Masonry, because the grid item get's positioned absolutely, it's parent container has it's height collapsed and the bottom margin becomes useless.\r\n\r\nEdit: The obvious solution would be for me to make Masonry target the container, however this wouldn't be suitable for me as my object is exists as a separate partial template using handlebars.js, this object is used across many pages, some require the bottom padding, other's don't.\r\n\r\nIs there any method for setting a bottom margin via Masonry rather than via CSS?\r\n\r\nThe only solution that comes to mind is adding inline styling via a separate JS function.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/desandro/masonry/issues/comments/197469794","html_url":"https://github.com/desandro/masonry/issues/840#issuecomment-197469794","issue_url":"https://api.github.com/repos/desandro/masonry/issues/840","id":197469794,"user":{"login":"desandro","id":85566,"avatar_url":"https://avatars.githubusercontent.com/u/85566?v=3","gravatar_id":"","url":"https://api.github.com/users/desandro","html_url":"https://github.com/desandro","followers_url":"https://api.github.com/users/desandro/followers","following_url":"https://api.github.com/users/desandro/following{/other_user}","gists_url":"https://api.github.com/users/desandro/gists{/gist_id}","starred_url":"https://api.github.com/users/desandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desandro/subscriptions","organizations_url":"https://api.github.com/users/desandro/orgs","repos_url":"https://api.github.com/users/desandro/repos","events_url":"https://api.github.com/users/desandro/events{/privacy}","received_events_url":"https://api.github.com/users/desandro/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T18:22:46Z","updated_at":"2016-03-16T18:22:46Z","body":"Thanks for reporting this issue.\r\n\r\n> Is there any method for setting a bottom margin via Masonry rather than via CSS?\r\n\r\nSorry nope. I understand your complication with using BEM philosophy and Handlebars templating. But in my experience, the more options Masonry has, the more brittle it becomes. Consider the difficulty of changing bottom margin with a media query, if it were done as a Masonry option. For these reasons, Masonry does not have a bottom margin, or bottom gutter option.\r\n\r\n[Packery does](http://packery.metafizzy.co/options.html#gutter), however. The size set for `gutter` is applied for both horizontal and vertical gutters."}}