W3C home > Mailing lists > Public > www-style@w3.org > July 2015

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

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Mon, 13 Jul 2015 12:08:25 +0200
Message-ID: <55A38E19.6010208@igalia.com>
To: www-style@w3.org

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:

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>

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.

Received on Monday, 13 July 2015 10:09:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:18 UTC