[css grid] Allow referencing the last line of implicit grids

Hi,

I've been having a quick conversation [1] today with Manuel Rego and Tab
Atkins about whether it was possible in an implicit grid (one where I
didn't provide any rows and columns templates so that cells would be
created automatically as needed) to make items span a whole track.

My use case was (and that's just for experimenting with css grids) to
create a sort of tabbar widget. I thought grids would be especially useful
for this in helping reduce the amount of markup and css needed.
The grid would have 2 rows, the first one would contain the tabs, and the
second one the tab panel into which content would be loaded.
I want each tab to occupy exactly one cell, and I want the widget to allow
adding/removing tabs dynamically, hence I don't know how many columns I'm
going to have in advance, therefore the implicit grid.
I want the panel the always occupy all available columns on the second row.

Manuel made a simplified example on jsbin [2].

It seems like the key to this would be to use "grid-column: 1 / -1;" but
negative numbers apparently only count from the last explicit line.

Do you think that use case is compelling enough to change the spec and
accept spanning implicit grids too?
I don't have enough experience using grids in real-world scenarios, but it
sure feels like something that should be possible.

Patrick Brosset

[1] https://twitter.com/patrickbrosset/status/619580052531978240
[2] http://jsbin.com/faxexe/1/edit?html,css,output

Received on Sunday, 12 July 2015 08:41:40 UTC