W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

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

From: Oliver Joseph Ash via GitHub <sysbot+gh@w3.org>
Date: Wed, 03 Jan 2018 17:01:50 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-355065586-1514998909-sysbot+gh@w3.org>
> You can have Grid do Masonry if you know the heights of the items ahead of time.

@tabatkins This is the same approach described in https://stackoverflow.com/a/45200955/5932012.

However, this won't work for images which have an aspect ratio instead of a hardcoded height. The height should change in relation to the column width.

@tabatkins Is there any pure CSS solution for masonry layout that can maintain a defined aspect ratio on each cell?

GitHub Notification of comment by OliverJAsh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/945#issuecomment-355065586 using your GitHub account
Received on Wednesday, 3 January 2018 17:01:51 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:22 UTC