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

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

From: Phil Cupp <pcupp@microsoft.com>
Date: Sat, 10 Mar 2012 07:01:15 +0000
To: Bert Bos <bert@w3.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <58A081B0F3FA704EAB1082E64639BB010A46C163@TK5EX14MBXC283.redmond.corp.microsoft.com>
> From: Bert Bos [mailto:bert@w3.org] 
>A) An element has a grid if any of 'grid-template', 'grid-rows' and 'grid-columns' (or the shorthand 'grid') has a value other than its initial value. These properties only apply to block containers. (I.e., 'grid' is modeled on 'columns'.)

I think what you're saying here is that you don't need to use display to become a grid.  Instead you just set grid properties and that triggers creation of a grid.  I'm not really a fan of that pattern for two reasons:

1. I think it implies that grid-* properties are something universal like width and height, i.e. they apply to all layouts, but that's not the case.  
2. Without the use of one clear property to control the creation of a particular layout type (display), properties would need to be prioritized so we know how to handle cases like <div style="column-count:2; flex-direction:row; grid-columns:10px 20px 30px"></div>.

I much prefer the pattern of display: foo where foo-* properties are applicable to the foo layout and not bar layout.  You know we have a foo layout and not a bar layout because display is foo.  Properties that don't have a display-specific prefix should be applicable to all layouts.

-Phil
Received on Saturday, 10 March 2012 07:01:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT