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

Hi,

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,
  Rego

Received on Thursday, 22 January 2015 15:05:10 UTC