W3C home > Mailing lists > Public > www-style@w3.org > May 2016

[css-grid] auto-repeat inside grid-template shorthand

From: Manuel Rego Casasnovas <rego@igalia.com>
Date: Mon, 23 May 2016 11:40:47 +0200
To: www-style@w3.org
Message-ID: <5742D01F.1050109@igalia.com>

this is a similar mail to the previous one.

In the current syntax for grid-template [1] we have:
  [ <line-names>? <string> <track-size>? <line-names>? ]+
  [ / <track-list> ]?

This means that the following declaration would be invalid:
  grid-template: "a b"
                 "a b" / repeat(auto-fill, 100px);

I guess that as you are defining the grid areas,
you know the number of columns and don't need auto-repeat.

However, you can do something like this:
  grid-template: "a b"
                 "a b" / repeat(5, 100px);
  grid-template: "a b"
                 "a b" / 400px 200px 100px 50px;

And this is valid from the syntax point of view.

Do we really want to have an exception for auto-repeat here or not?

FWIW, right now it's valid in all auto-repeat implementations (Blink,
Webkit and Firefox).


[1] https://www.w3.org/TR/css-grid-1/#explicit-grid-shorthand
Received on Monday, 23 May 2016 09:41:45 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:59 UTC