Re: [css3-images] Making gradients readable

On Oct 30, 2011, at 11:19 PM, Brian Manthos <brianman@microsoft.com> wrote:

> As such, that pushes us toward...
> 
>    radial-gradient(<sizeOrShape> [with <position>]?, <color-stop>[, <color-stop>]+ )
> 
> Note that you can then rewrite them as...
> 
> <linear-gradient> = linear-gradient(<linear-params>, <color-stop>[, <color-stop>]+)
> <radial-gradient> = radial-gradient(<radial-params>, <color-stop>[, <color-stop>]+)
> 
> <linear-params> = [ <angle> | from <side-or-corner> ]
> <radial-params> = (<sizeOrShape> [with <position>]?

I think that fantasai was proposing 'from <position>'  for radials, which I agree is more intuitive, and aids comprehension. 

> Notice the consistency between the two.
> 
> Replacing the comma before the first <color-stop> is graituitous, doesn't advance the cause of readability, and makes the syntax longer and parser (slightly) more complicated.
> 
> I don't see the win, but I see a negative in reopening the <linear-gradient> grammar without having a REALLY good reason.  Reopening that debate is a waste of everyone's time, and moves the timeline for the spec and implementations later into the future.

So this is about replacing the comma before the color stops with an 'as'. I generally agree with fantasai on the general strategy of making the syntax more readable, but don't think 'as' helps that much. 

Received on Monday, 31 October 2011 13:42:02 UTC