- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 13 Jul 2015 09:42:15 -0700
- To: Manuel Rego Casasnovas <rego@igalia.com>
- Cc: www-style list <www-style@w3.org>
On Mon, Jul 13, 2015 at 3:08 AM, Manuel Rego Casasnovas <rego@igalia.com> wrote: > On 11/07/15 14:21, Patrick Brosset wrote: >> It seems like the key to this would be to use "grid-column: 1 / -1;" for >> the panel but negative numbers apparently only count from the last >> explicit line, however here the grid is implicit. >> >> Manuel made a simplified example on jsbin [2]. >> >> Do you think that use case is compelling enough to change the spec and >> accept spanning implicit grids too? > > JFTR, it seems that the decision to have "-1" referring to the last > explicit line was taken in this thread: > https://lists.w3.org/Archives/Public/www-style/2013Mar/0588.html > > The main issue I guess is what happens in the following use case: > <div style="display: grid; grid-template-columns: auto auto;"> > <div style="grid-column: -1;">item</div> > </div> > > So originally we'll have the following lines: > [1 -3] auto [2 -2] auto [3 -1] > > The "item" will be adding a new implicit column (the 3rd column), so -1 > refers to the last explicit line not the last implicit line. And the > lines now would be: > [1 -3] auto [2 -2] auto [3 -1] auto [4] > > Otherwise we would be changing the position of the "-1" line as new > implicit columns are added. Well, first, we're definitely not going to change the existing meaning of the numbers. Those'll still start from the edges of the explicit grid. If we did add this (and I think it's a good idea), we'd need new syntax (probably two keywords, to avoid adding *more* collisions to the existing grammar), and we'd only make it valid in the grid-*-end properties, so you couldn't create new implicit lines with it. ~TJ
Received on Monday, 13 July 2015 16:43:03 UTC