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

> 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 UTC