Re: [css3-grid-layout] semantic zoom in grid's templates

Okay, let's say I'm the only alien on earth who thinks like that (or, at 
least, it seems we're very few to be infiltrated in the human being right 
now). [;-)]

This is not that an issue since I'm not talking about personnal tastes here, 
but about usability and maintainability. My proposal is the only one to keep 
changes in the code small when doing small changes in the layout, and I 
still think that it's the only one to provide easy grid composition (ie: 
replace a cell or a group of cells by another grid template), which I 
believe is an important feature for any grid layout. Another huge win is 
that it's by far the most condensed way to define things (in terms of bytes) 
which means it will need fewer bandwith to send the CSS over the network.

I'm really curious about what kind of solution you have to propose to my 
3-steps grid template evolution. To me, it seems the two solutions we can 
use today aren't that great in such case. Both will require a computer work 
or, worse, many handwork.





-----Message d'origine----- 
From: Tab Atkins Jr.
Sent: Saturday, February 25, 2012 12:05 AM
To: Phil Cupp
Cc: François REMY ; CSS 3 W3C Group
Subject: Re: [css3-grid-layout] semantic zoom in grid's templates

On Fri, Feb 24, 2012 at 2:29 PM, Phil Cupp <pcupp@microsoft.com> wrote:
>>From: François REMY [mailto:fremycompany_pub@yahoo.fr]
>>My reasoning is simple: the first representation (the "fraction bar" one) 
>>is easily readable, while the second one ("multiline template") is 
>>impossible to understand, and very complex to type.
>
> [pcupp] I think there are a lot of strong opinions about template syntax. 
> Here my view is opposite your own.  I think one can see the shape of the 
> grid in the multi-line example and not the alternative you proposed.

I'm with Phil - I find the fraction-bar style very difficult to read,
while the normal template is easy.  The ascii-art nature of the
template makes it trivial to read, while yours requires me to do
parsing in my head and reconstruct it into a 2d structure.  That
removes most of the benefit of the template in the first place.

If you want grammar-based templates, I'd suggest starting with a 
preprocessor.


>>Also, the "multiple lines" string template is unstable.
>
> [pcupp] I agree a weakness of the template syntax is maintenance of the 
> template definition.  You trade the pain of making ascii art for a visual 
> representation of the grid.  Authors that currently take the time to 
> create and maintain ascii art in the comments of their code will likely 
> enjoy a new ability to have their art actually be the layout definition. 
> Authors that choose not to spend time on such things don't need a template 
> syntax at all.  Just define row and column definitions and (optionally) 
> use named lines.

Yup.  I don't think your characterization is quite accurate (I don't
do ascii-art drawings of my layout in comments, but I'm still madly in
love with templates), but whatever.

~TJ 

Received on Saturday, 25 February 2012 00:13:54 UTC