Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed dynamic grid... #12

Open
rickghome opened this issue Nov 6, 2015 · 0 comments
Open

Proposed dynamic grid... #12

rickghome opened this issue Nov 6, 2015 · 0 comments

Comments

@rickghome
Copy link

Hey Jamie -- I've needed a class that creates a responsive grid without column/row specifications. Consider adding the following class to closure. I've provided some sample breakpoints:


.griddle {
    margin:0px;
    width:100%;
    padding:0px;
    list-style-type:none;

    > li {
        float:left;
        width:100%;
        padding:0px;
        margin:0px 0px 1rem 0px;
    }

    @media all and (min-width: 800px) and (max-width: 1279px) {
        li {
            width:50%;
            &:nth-of-type(2n+1) {padding-right:1%; }
            &:nth-of-type(2n+2) {padding-left:1%; }
        }
    }

    @media all and (min-width: 1280px) and (max-width: 1599px)  {
        li {
            width:33.33%;
            &:nth-of-type(3n+1) {padding-right:1%; }
            &:nth-of-type(3n+2) {padding:0 .5%; }
            &:nth-of-type(3n+3) {padding-left:1%; }
        }
    }

    @media all and (min-width: 1600px) {
        li {
            width:25%;
            &:nth-of-type(4n+1) {padding-right:.75%; }
            &:nth-of-type(4n+2) {padding:0 .75%; }
            &:nth-of-type(4n+3) {padding:0 .75%; }
            &:nth-of-type(4n+4) {padding-left:.75%; }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant