- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 07 May 2015 11:24:07 -0700
- To: François REMY <francois.remy.dev@outlook.com>, 'CSS WG' <www-style@w3.org>, 'Chris Eppstein' <chris@eppsteins.net>
On 02/09/2015 01:16 PM, François REMY wrote: > > 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
Received on Thursday, 7 May 2015 18:24:36 UTC