Re: [csswg-drafts] [css-grid][css-flexbox] Pinterest/Masonry style layout support

I don't see why you force a specific column in your example, you can achieve the exact same example like this:

```
.masonry {
    display: grid;
    grid-template-column: repeat(3, 300px);
    grid-column-gap: 20px;
    grid-auto-rows: auto;
}
.item:nth-child(3n+1) {
    grid-column: 1;
}
.item:nth-child(3n+2) {
    grid-column: 2;
}
.item:nth-child(3n) {
    grid-column: 3;
}
```

(and when you have subgrid, you will be able to wrap this niceline in one row of the parent grid if you want, yet reusing the grid lines for your columns)

-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/945#issuecomment-395878536 using your GitHub account

Received on Friday, 8 June 2018 20:18:50 UTC