RE: [css3-grid] Question about section 6.5

Hi David,

Zero or more names should be allowed on either side of a <track-minmax> or on either side of a <track-group>.  Looks like the grammar has a mistake: the <string>* from the <track-group> rule should have been inside the square brackets of [ <track-minmax> ]+.

The intent is that anywhere a track occurs, you should be able to name the lines around it.  That doesn't work for groups of repeating tracks, but I thought there might be some value in doing the following:

/* make 10px gutters before, after and between 10 equally sized columns */
grid-columns: (10px "content-begin" 1fr)[10] "content-end" 10px;

In the above, "content-begin" and "content-end" name the lines that span the columns intended to hold content.

Also, in addition to fixing the mistake, I think the grammar could be better written like this (eliminating two occurrences of <string>*).

<track-list>    => [ [ <string> ]* <track-group> [ <string> ]* ]+ | 'none'
<track-group>   => [ '(' [ [ <string> ]* <track-minmax> [ <string> ]* ]+ ')' [ '[' <positive-number> ']' ]? 
                   | <track-minmax>
<track-minmax>  => 'minmax(' <track-breadth> ',' <track-breadth> ')' | 'auto' | <track-breadth>
<track-breadth> => <length> | <percentage> | <fraction> | 'min-content' | 'max-content'

What do you think?

-Phil

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of David Hyatt
Sent: Friday, May 13, 2011 1:02 PM
To: www-style@w3.org CSS
Subject: [css3-grid] Question about section 6.5

I'm confused about the grammar in section 6.5, specifically:

<track-group>   => [ <string>* '(' <string>* [ <track-minmax> ]+ <string>* ')' [ '[' <positive-number> ']' ]? <string>*
                   | <string>* <track-minmax> <string>*

There are uses of <string>* that I don't understand.  Each row can have 0 or more names, so I understand why you have <string>* in front of <track-minmax>, but I don't understand what the <string>* that follows <track-minmax> is supposed to represent.

Also, in the repeating case, it seems odd to me that you can specify a name at all, since any names you specify would be duplicated and ignored in the repeating rows/columns.

dave
(hyatt@apple.com)

Received on Saturday, 14 May 2011 05:52:11 UTC