RE: [css-grid] Using brackets for line names

> Alan Stearns brought up a really great point that the repeat() syntax in Grid
> Layout would be easier to read if line names used brackets instead of
> parentheses
> 
>    repeat([line-name] 10px [line-name] calc(60em+10px))
> 
> vs
> 
>    repeat((line-name) 10px (line-name) calc(60em+10px))
> 
> Since there's no particular reason to go with one vs the other, we could just
> change it. Thoughts?
> 
> ~fantasai

FWIW, there's at least some non-subjective reason to prefer brackets, because parentheses conflict with the SASS/LESS value-computation syntax. I would actually be happy to use "width: (100% - 125px)" instead of "width: calc(100% - 125px)" in my stylesheets, especially if (in some hypothetic future) we expand the calc syntax to match things we can do in Media Queries L4. Anyway, even without this, I think naming a line isn't an essential feature enough to endorse the responsibility of closing the door to some general-purpose grouping feature in css, whichever it may be.

Given there's no shipped implementation of css grid and I've yet to see a good reason to prefer parentheses, I would welcome the change.

Received on Thursday, 7 May 2015 19:49:58 UTC