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 15:42:44 -0700
Message-ID: <CAAWBYDAv8viTa_4mTUwCSs2y+Cro_iyQJgjquq_iJ4b1bwZ+cQ@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 3:15 PM, Francois Remy
<francois.remy.dev@outlook.com> wrote:
> | repeat(auto-fill, ...) and repeat(auto-fit, ...) gain
> |    back a full <track-list> argument.  Per the use-case,
> |    only full track-list repetitions are allowed; if tracks
> |    are dropped, the entire track-list group must be dropped.
> I was wondering whether this meant repeat(...) would take auto-sized tracks, and if that is something implementors could deal with.

Ah, I see, that's a mistake on our part.  The auto repeat()s would
still only take fixed-size tracks.  grid-auto-rows/columns would take
a full <track-list>, tho.  (Well, without names; just <track-size>+.)

> My subgrid example definitely does require auto-sized tracks, but it could be achieved with just auto-rows taking multiple tracks, so I am not sure why this proposal speaks about auto-fit/auto-fill groups of tracks. That looks unnecessary for the feature, which is why I asked.

Auto rows are fine when you're filling the whole grid, or spilling off
one end.  But if you're filling an interior area of the grid, you need
repeat(), and if you're using subgrids to group things into similar
structures, you'll want to repeat rows.  It's possible that this isn't
actually a worthwhile use-case, tho, as you can either predict the
number of "mega-tracks" you'll need (and can use repeat() with an
integer argument, no change necessary to the grammars) or you can't
and have to deal with overflow (skipping over your footer/sidebar,
which is ugly, and requiring you to repeat your mega-track in

>> > 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.
> Ok, Thanks for the clarification! Because of the reordering+clamping, you can make it work by spanning them from 0 to infinity (or a better upper bound if you have some) which will map to the right space. For some reason I missed the part about the line numbers being shifted appropriately.

Or just give them no grid-row/column values at all, so they'll fill
the padding box of the subgrid.

Received on Monday, 18 April 2016 22:43:32 UTC

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