bigbite / macy.js

http://macyjs.com/
MIT License
1.3k stars 156 forks source link

expand breakAt breakpoints to an object #17

Closed theodoregold closed 7 years ago

theodoregold commented 7 years ago

I feel that just specifying breakAt columns is not enough. Sometimes on smaller screens, you need smaller margins and larger margins in bigger screens.

Macy.init({
    container: '#macy-container',
    margin: 24,
    columns: 6,
    breakAt: {
        1200: 5,
        940: 3,
        520: {
                columns: 2,
                margin: 12,
        },
        400: 1
    }
});
jrmd commented 7 years ago

@teodors currently there is a v2 complete just undergoing testing and should be released soon, I may add this to a 2.1 release as i understand this could be useful