- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 14 Mar 2013 11:10:14 -0700
- To: www-style list <www-style@w3.org>
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. Suggestions? Anything better? We'll bring this up on next week's telcon to decide. ~TJ and fantasai
Received on Thursday, 14 March 2013 18:11:01 UTC