W3C home > Mailing lists > Public > www-style@w3.org > January 2015

Re: [css-grid] [Collapsed Grid Items] [ISSUE 2]

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Thu, 22 Jan 2015 16:04:32 +0100
Message-ID: <54C11180.6020700@igalia.com>
To: Mikel Zorrilla <mzorrilla@vicomtech.org>, www-style@w3.org
CC: Iñigo Tamayo <itamayo@vicomtech.org>, Igor García Olaizola <iolaizola@vicomtech.org>, Angel Martin <amartin@vicomtech.org>, Ana Dominguez <adominguez@vicomtech.org>, François Daoust <fd@w3.org>

On 21/01/15 14:03, Mikel Zorrilla wrote:
> Dear CSS Grid editors,

I'm not an editor, but an implementor of CSS Grid Layout. Anyway I'll
share my thoughts. :-)

> Our idea is based on having the items ranked with a priority, depending
> their position in the layout. The priority will be allocated going over the
> layout matrix from left to right and from top to down. In the following
> example:

I guess you mean here "their position in the DOM tree".

> [image: Imágenes integradas 1]
> If we remove one of them, the Collapsed Grid mechanism will allocate the
> items depending their priority, the first empty place where there is enough
> space for that item going over the layout matrix from left to right and
> from top to down.
> For example, if we remove number 4:
> [image: Imágenes integradas 2]
> If we remove number 2:
> [image: Imágenes integradas 3]
> If we remove number 3:
> [image: Imágenes integradas 4]

If I'm getting it properly, this is more or less what's provided by
auto-placement feature.
If you have "grid-auto-flow: row;" (which is the default) and all the
items are auto-positioned, you'll have the behavior that you're
explaining when you add/remove items from the grid.

In case you want to experiment with it, auto-placement is already
implemented in Chromium/Blink (enabling the feature flag) and WebKit
Nightlies (using -webkit prefix).

Just my 2 cents,
Received on Thursday, 22 January 2015 15:05:10 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:47 UTC