W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css3-grid-layout] Dense auto layout

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 6 Mar 2013 09:29:19 -0800
Message-ID: <CAAWBYDACWCQmtfO+kGUJ0ey2pmcPrQHnncsp_Q6RGSYCG0O--w@mail.gmail.com>
To: Henrik Andersson <henke@henke37.cjb.net>
Cc: www-style list <www-style@w3.org>
On Mon, Mar 4, 2013 at 7:04 PM, Henrik Andersson <henke@henke37.cjb.net> wrote:
> I have read the grid layout module and I think that it is very good, but
> there is one thing that bothers me.
> It is about the automatic grid placement. I think that it has a problem
> with spanned grid items. Namely, it leaves holes of unused space in the
> grid in some situations.

I strongly agree that dense packing is useful, but it has some
downsides as well:
* it has worse performance (n^2 rather than n, though most of the time
the n will be small)
* it can sometimes be confusing, as elements late in document order
can appear before elements much earlier than them in document order,
if they're the first thing to fit in that hole (but most of the time,
holes will be filled pretty quickly)

Because of this, I suggest a switch on the grid-auto-flow property
that controls whether the packing is dense or loose.

Note that WebKit's implementation accidentally implemented dense
packing already. ^_^  (It showed up in Chrome Canary a few days ago,
if you want to check.)

Received on Wednesday, 6 March 2013 17:30:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC