W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-grid] Reduced Subgrid Proposal

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 18 Apr 2016 14:34:39 -0700
Message-ID: <CAAWBYDAu4a76Cc5cemAwE+oRCewaNqTzbES=vDe1jzoTFFwvXw@mail.gmail.com>
To: Francois Remy <francois.remy.dev@outlook.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>, "Eric A. Meyer" <eric@meyerweb.com>, Jen Simmons <jen@jensimmons.com>, Rachel Andrew <rachelandrewuk@gmail.com>
On Mon, Apr 18, 2016 at 10:21 AM, Francois Remy
<francois.remy.dev@outlook.com> wrote:
>> fantasai's message is the long and complete proposal, so for the purpose of
>> easier comprehension, here's the tl;dr:
>>
>> display:subgrid is very similar to display:contents - the elements'
>> children position/size/etc in the *parent* grid instead.  Except:
>>
>> * they get positioned "as a group" - they can only fill the grid cells that the
>> subgrid does (which is predefined - subgrids need an explicit grid span in
>> both dimensions)
>> * the subgrid itself does draw (so you can have margin/border/padding
>> around the group)
>> * when sizing, the subgrid itself contributes - it acts like an empty grid item in
>> the parent grid, and its children that touch one of its edges act like they have
>> extra margin equal to the m/b/p of the subgrid on that edge, so they'll
>> *look* like they're visually aligned
>> *within* the subgrid by default (despite laying out in the parent grid instead).
>
> With the addition of "repeat this group of tracks as a block" that might work out. Still not confident about it, though, because last I know you could only auto-repeat things that were fixed-sized. Since this change is not specced yet, I would just want to get a few examples of how you would use this track-group repeat. Is this a auto-row feature?

I'm not sure what you're asking about.  Isn't this all addressed by #5
in the proposal?  What specifically is confusing you about that?

> I would also want more details about how this proposal handles position:absolute items. Since all elements are laid out in the main grid, my understanding is that if you parent subgrid has position:relative, this does not affect you in any way; is that correct? Is there a way you could get an absolutely positioned layer on top of your subgrid (that would be inside the subgrid) without giving up on auto layout in the subgrid? That might be a broader grid issue though, didn't think this through entirely.

Abspos children of a subgrid, like grid items of a subgrid, get laid
out according to the parent grid, but with the scoped lines; they only
see the numeric lines contained in the subgrid (renumbered within the
subgrid to be 1-N again), and whatever named lines it
creates/receives.  This should be implicit in the "exactly like grids,
except" part.

> Other than that, I think this is fine by me. Didn't ask our dev team, so this is just my own personal opinion.

Cool.
Received on Monday, 18 April 2016 21:35:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC