W3C home > Mailing lists > Public > www-style@w3.org > May 2011

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 18 May 2011 12:50:55 -0700
Message-ID: <BANLkTinxB8Z_HD3jKrH9ka_EqwPvde6jGQ@mail.gmail.com>
To: Phil Cupp <pcupp@microsoft.com>
Cc: David Hyatt <hyatt@apple.com>, "www-style@w3.org CSS" <www-style@w3.org>
On Wed, May 18, 2011 at 12:18 PM, Phil Cupp <pcupp@microsoft.com> wrote:
> On May 18, 2011 9:51 AM, Tab Atkins Jr. [mailto:jackalmage@gmail.com] wrote:
>> That said, I'd be okay with *only* having named grid-cell pseudos generated by 'grid-template', and knocking out the anonymous grid-cells.
> Making sure we're using the same dictionary so I don't misread what you're saying:
> Grid Cell: a logical space used for laying out Grid Items.
> Explicit Grid Cell: a Grid Cell that has been given a name using the grid-template property or grid-cell pseudo-element function.
> Anonymous Grid Cell: a Grid Cell created to serve as the containing block for a Grid Item which was positioned directly on the Grid using the grid-row and grid-column properties.
> Explicit Grid Cell Example 1:
> #grid1 { display:grid; grid-template: "abc" } /* defines three Explicit Grid Cells: a, b and c. */
> #item1 { grid-cell: "a" } /* item1 occupies the Explicit Grid Cell "a" */
> Explicit Grid Cell Example 2:
> #grid2 { display:grid }
> #grid2::grid-cell("myCell") { grid-column:1; grid-row:1 } /* defines an Explicit Grid Cell named "myCell" */
> #item2 { grid-cell: "myCell" } /* item2 occupies the Explicit Grid Cell "myCell" */
> Anonymous Example:
> #grid3 { display:grid }
> #item3 { grid-column:1; grid-row:1 } /* creates an Anonymous Grid Cell to serve as the containing block for item 3 */
> So when you said knocking out the anonymous Grid Cells, are you referring to what I'm calling Explicit Grid Cells that happen to be defined by a grid-cell pseudo-element function, or did you mean doing away with my "Anonymous Example" above?  I hope the former as I'm really fond of the Anonymous Example.  If you mean the latter, then are you saying the pseudo-element function still exists so that we can set properties like display, but you can't create an Explicit Grid Cell in that way, only refer to ones defined using grid-template, or are you saying that you'd be OK with it not existing at all and the grid-template property is just a way to name a region of space that cannot be further styled?

I meant that I'd be okay with dropping the functionality of Example 2.
 The grid-template functionality in Example 1 is valuable, and the
fully anonymous grid-cell created in Example 3 isn't a problem so long
as we define how it's ordered with respect to other grid cells.
Essentially, the fact that a grid cell is created in Example 3 is just
a theoretical detail to keep the model.

The intuitive ordering for grid-cells then would be that grid-template
cells are on the bottom by default (their relative ordering is
unimportant, as they can't overlap), and anonymous cells are above
that, in DOM order of the elements they're created for (this is
unambiguous, since we have a guarantee of one cell per element here).

Then, presumably, z-index can change the ordering, either directly on
::grid-cell for grid-template cells, or on the element for anonymous

Received on Wednesday, 18 May 2011 19:51:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC