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

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
implies.

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?

~TJ

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