[css3-grid] grid-cell-stacking and grid-layer should be removed

On May 14, 2011, at 3:40 AM, Phil Cupp wrote:

> (1) Your example creates two different Grid Cells that occupy the same space

Good, that's what I would expect.

> (2) I would prefer that Grid Cells only define space for Grid Items.  Only the properties: grid-row, grid-column, and grid-cell-stacking would apply

I think grid-cell-stacking should be dropped in favor of just using the display property (more below).

> (5) Grid Items only share the same Grid Cell when they have a grid-cell property that refers by name to the same explicitly defined Grid Cell.
> 

So items that use anonymous cells are never coalesced? They always get their own unique cell?

> 
> More about (4):
> 
> Grid Items form a Partial Stacking Context.  I'm not sure if that term is in common use so I'll define it as the type of Stacking Context established by floats or positioned items having a z-index of 'auto'.  A float forms a new Stacking Context, but won't act as the parent Stacking Context for any of its descendants which also form new Stacking Contexts of their own.  In practical terms, having the Grid Item form a Partial Stacking Context means that each Grid Item draws atomically so that its backgrounds/borders and text won't be interleaved with other Grid Items when they intersect each other, and also that any positioned descendants aren't "trapped" in the Grid Item.
> 
> You might ask why should Grid Items draw atomically and get some special treatment?  My assumption has been that it will be common to use the Grid to layer elements when constructing controls.  Also it's been my experience that authors are surprised when they get interleaving behavior due to something like negative margins.  Now we are giving authors a tool that allows explicit positioning of elements using a coordinate system established by the Grid's Lines.  It seems natural in my opinion that like positioned elements, Grid Items should draw atomically.

You've basically defined another display type here: the stack.  This was implemented in Mozilla years ago along with flexible boxes, and rather than trying to sneak it in as the default layout system for grid cells, I'd prefer it if we defined stacks separately and then just allow grid cells to use different display types.  Then authors could use flexible boxes or blocks to do grid-cell-stacking: rows | columns and stacks to do grid-cell-stacking: layer.

This is an ancient document, but see section 2.2:

http://www-archive.mozilla.org/projects/xul/layout.html

Note that z-index is supported on XUL stacks and works fine without introducing a new property.  I think grid-layer should just be replaced with z-index.  I don't think it's necessary to support grid-layer across cells, but maybe you have use cases besides stacking within the same cell that could convince me otherwise.

dave
(hyatt@apple.com)

Received on Monday, 16 May 2011 15:51:16 UTC