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: Tue, 26 Apr 2016 11:58:16 -0700
Message-ID: <CAAWBYDAnmywn9P812VyLm8FbWJaM2LueUqtQ2RjfMrFSGiH5ZQ@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: Manuel Rego Casasnovas <rego@igalia.com>, www-style list <www-style@w3.org>
On Mon, Apr 25, 2016 at 1:24 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 04/20/2016 01:53 AM, Tab Atkins Jr. wrote:
>> On Tue, Apr 19, 2016 at 3:36 AM, Manuel Rego Casasnovas <rego@igalia.com>
>> wrote:
>>> On 15/04/16 00:35, fantasai wrote:
>>>> Major Use Cases Not Handled
>>>> ===========================
>>>>    Requiring subgrids to work in both axes at once means
>>>>    the following use case cannot be handled:
>>>>    header  header
>>>>    sidebar main
>>>>    footer  footer
>>>>    where main is a catalog whose columns line up with
>>>>    content in the header and footer (and therefore need
>>>>    to be part of the main grid) but whose rows are auto
>>>>    flow, and therefore need to be independent of the
>>>>    main grid. Without single-axis subgridding, we can't
>>>>    add rows to main without disrupting the alignment of
>>>>    main to sidebar and the placement of footer.
>>> What will happen with this in the future?
>>> If we eventually want to support something like that, the new syntax
>>> "display: subgrid;" might be an issue.
>>> I'm not sure how important is this use case, but if we want to support
>>> it at some point (level 2), we should think in the syntax beforehand.
>> Actually, that specific case is handled just fine by this - make sure
>> the catalog items are in some wrapper (which they probably will be
>> anyway, like a <ul> or something) and just make it a display:grid
>> positioned in the "main" area.  It can then set up the lines that it
>> wants for the catalog items to subgrid against.
>> The more complex case that isn't handled is if, for example, the
>> "main" area spans several columns, and you want the catalog items to
>> care about those columns, but you don't know how many rows there will
>> be so you can't line it up with the parent grid's rows.  I think this
>> (and a chunk of similar complex use-cases) is best served by something
>> like the idea Fran├žois had earlier, of linking together grids in some
>> way so they size their grid tracks together.  This is complex and hard
>> to get right, so we're going to avoid it unless absolutely necessary,
>> but I think it's the way to go if we do end up needing to do this sort
>> of thing.
> Tab, the "complex case" you're talking about is exactly the one
> described in the OP...

Nope, the case in the OP is actually too over-simplified to be
problematic, as I explained in the thing you quoted.  The cell the
"subgrid" is going into is 1x1, so you don't need to subgrid at all
(at least, not against the page grid).

Received on Tuesday, 26 April 2016 18:59:04 UTC

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