W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: [css3-grid-layout] grid-descendant grid items

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 9 Aug 2012 09:25:02 -0700
Message-ID: <CAAWBYDCzvFMssQwnDq5NT8n7drVzOi7=VLHOB9LiHMmVh=ySgg@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Aug 9, 2012 at 12:40 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
> Basically what's needed is a way for a grid item to itself be
> a grid whose items in turn participate in its parent's grid.
> Here's a (very rough) proposal:
>   * Set the grid-span initial value to 'auto'. Have it generally
>     compute to 1.
>   * Define 'display: subgrid' to be an element that
>      * itself is a grid element
>      * determines its own number of rows and columns and uses
>        that as its grid-span in its parent grid
>      * has its items participate in the sizing of the parent grid
> Then you can place items into a grid, either as auto-placed children
> or as explicitly-placed descendants, and have their contents
> participate in the grid. This allows aligning content within grid
> items across the grid, as with the inputs and labels in the form
> example Bert gave.

I don't see quite how this works.  Do you assume that the subgrid's
margin/border/padding are subtracted from the sizes of the appropriate
grid areas inside of itself?

If not, then this is equivalent to just positioning both the list item
and its children in the parent grid, with the overlapping that

If so, what happens when the sum of this is larger than the size of
one of the grid areas that its child wants to participate in?

Received on Thursday, 9 August 2012 16:25:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:50:26 UTC