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

RE: [css3-grid] Question about section 6.5

From: Phil Cupp <pcupp@microsoft.com>
Date: Sat, 14 May 2011 05:51:43 +0000
To: David Hyatt <hyatt@apple.com>, "www-style@w3.org CSS" <www-style@w3.org>
Message-ID: <26AA92D3A047B64C8F326A0BF9EB17FA33C2AD17@TK5EX14MBXC136.redmond.corp.microsoft.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT