Re: [css3-grid-layout] Syntax of track lists wrt named grid lines

On Thu, Mar 14, 2013 at 11:10 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> Looking over the current syntax for declaring named grid lines in
> grid-definition-rows/columns, we've come to the conclusion that the
> current syntax is *terrible*:
>
> * We're using strings to represent a user-ident, which is inconsistent
> with everything else in CSS.
> * The syntax is hard to scan and see how many columns/rows there are,
> and how things are grouped.
>
> An example of the current syntax, taken from the current spec:
>
> grid-definition-columns: "first" "nav" 150px "main" 1fr "last";
> grid-definition-rows: "first" "header" 50px "main" 1fr "footer" 50px
> "last";
>
> Our current suggestion for fixing this is to switch the line names to
> idents, and then use () to surround each set of line names:
>
> grid-definition-columns: (first nav) 150px (main) 1fr (last);
> grid-definition-rows: (first header) 50px (main) 1fr (footer) 50px (last);
>
> This immediately seems to be much easier to read and scan - it's easy
> for the eye to skip over parentheticals, so you can quickly see how
> many tracks there are and what their sizing functions are.
>

I'm confused, why do we allow multiple names for a single line? I agree
that the parentheses syntax is better if we want to allow that, but the
confusion of what this does outweighs the benefits of being able to have
multiple names for a line.

Suggestions?  Anything better?  We'll bring this up on next week's
> telcon to decide.
>
> ~TJ and fantasai
>
>

Received on Tuesday, 2 April 2013 20:28:59 UTC