RE: [css-grid][css-syntax] Usage of lone parentheses across CSS?

> > The idea I’ve had is to use a “switch-case” like syntax. This proposal is
> certainly audacious but, I think, not extravagant.
> > To give you a better idea of what I’ve in mind, I took some examples from
> the spec and converted them to the proposed syntax:
> >
> >      grid-template: auto 1fr auto /
> >
> >        header-top: "a   a   a"    header-bottom:
> >
> >        main-top: "b   b   b" 1fr main-bottom;
> >
> >        grid-template-columns:
> >
> >          a:        auto
> >
> >          b:        minmax(min-content, 1fr)
> >
> >          b: c: d:  repeat(2, e: 40px)
> >
> >                    repeat(5, auto);
> >
> > Syntax-wise, a line name is represented by an identifier followed by a
> > colon (except if it’s last token as I propose the last colon can be implied).
> >
> > What do you think? Do you like it?
> 
> IIRC it's not valid per the core syntax, due to the bare colons.
> 
> Also, I think it's way harder to read. The parentheses syntax works well on a
> single line or multiple, without any special indentation scheme, and
> represents the logical hierarchy of the track syntax much better.
> The line names occur between the lengths representing the tracks, just like
> they do in the grid layout model.
> 
> So, no, don't think it's an improvement at all. :)
> 
> ~fantasai

To be honest, I did completely forget I even proposed this someday :-)
Having to reread it makes me understand your point about readability. Let's all forget this proposal ;-)

Received on Thursday, 7 May 2015 19:29:19 UTC