- From: François REMY <francois.remy.dev@outlook.com>
- Date: Mon, 9 Feb 2015 22:16:47 +0100
- To: "'CSS WG'" <www-style@w3.org>, "'Chris Eppstein'" <chris@eppsteins.net>
- Message-ID: <DUB405-EAS3352FF62BF604F1EACE7D92A5270@phx.gbl>
Hi there, I think the decision to use bare parentheses to group line names in CSS Grid is still somewhat a controversy. I’ve never been a huge fan of it, because I think it prevents future css-values primitives to make use of it [1] and the SASS team said it conflicted their ‘calc’ equivalent [2]. The authors of the spec themselves didn’t really make a well-argumented choice, mainly choosing for something that looked good to them. [2] The issue is that, to move away from the metastable statu-quo, a better option is necessary; and we haven’t seen one until now. I wanted to give this thread another try. 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? Best regards, François [1] http://lists.w3.org/Archives/Public/www-style/2014Jun/0393.html [2] http://lists.w3.org/Archives/Public/www-style/2014Dec/0302.html
Received on Monday, 9 February 2015 21:17:22 UTC