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

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 14 Mar 2013 23:38:14 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <dli4k8ptuj5361f674tnpn47plth7vcae1@hive.bjoern.hoehrmann.de>
* Tab Atkins Jr. 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.

That's not quite correct, e.g. font-family as property and descriptor
allows user-defined identifiers as strings, as it should, because the
use of white space in font family names is quite common. Having to hy-
phenate or CamelCase all the time can be inconvenient in some settings,
if the idea is to allow only <identifier>s, as CSS does in some places;
I'm not sure whether this is such a case, but it should be kept in mind.

>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);

That does seem better to me, but I note that juxtaposed identifiers
without a separator can be quite confusing; some might read this as

  grid-definition-columns: "first nav" 150px ...
  grid-definition-rows: "first header" 50px ...

and that is probably not intended.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Thursday, 14 March 2013 22:38:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC