W3C home > Mailing lists > Public > www-style@w3.org > April 2013

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

From: Ojan Vafai <ojan@chromium.org>
Date: Tue, 2 Apr 2013 13:28:10 -0700
Message-ID: <CANMdWTuCoMdiCOVBghZgG2NoBSbT90sSCPFnZghANF7ZWVYAMQ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:10 UTC