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

Re: [css3-grid-layout] [css3-layout] Grid-Template Declaration Merge

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 01 Mar 2012 14:11:47 -0800
Message-ID: <4F4FF423.1000205@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
On 02/23/2012 10:26 AM, fantasai wrote:
> On 02/21/2012 06:59 PM, Phil Cupp wrote:
>> I see... the new shorthand for grid-template, grid-rows and grid-columns you are saying is just plan "grid" and uses the
>> inline sizing function syntax from Bert's spec. Your right I did miss that. Do you have any thoughts on how I'd specify
>> named lines and differentiate those from the template strings? Maybe they should be idents instead of strings?
>
> We do generally use idents rather than strings for user-defined names,
> so I'm happy to use idents. :) Just a bit concerned about them being
> confusable with sizing keywords we might add in the future.
>
>> grid:
>> "ab" / minmax(min-content, 1fr) /* row 1 */
>> "ac" / minmax(min-content, 1fr) /* row 2 */
>> ( minmax(min-content, 1fr) )[2]; /* 2 cols */
>>
>> /* Also valid? */
>> grid:
>> start minmax(min-content, 1fr) middle minmax(min-content, 1fr) end, /* 2 rows with 3 named lines*/
>> start minmax(min-content, 1fr) middle minmax(min-content, 1fr) end; /* 2 cols with 3 named lines */
>>
>> When not using the template syntax we need something to separate row definitions from column definitions. I used a comma. I
>> think that's compatible with the template syntax as well and can eliminate the need for the trailing '/' which currently
>> follows each row definition that receives a sizing function.
>
> Commas in CSS are used for lists of parallel items, so I don't think that's
> quite appropriate. Could use a double slash, though. (Or a single one, if
> we're getting rid of them elsewhere.)
>
> For the minimized syntax (without the template), though, I'm concerned that
> the ordering is the opposite of elsewhere in CSS, where we state horizontal
> sizing first and vertical sizing second.

Hey, here's an idea! Let's put the column sizes before the template,
intead of after it. That way in the minimized version, you get the
ordering right:

   grid: column size list / row size list;

~fantasai
Received on Thursday, 1 March 2012 22:12:20 GMT

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