W3C home > Mailing lists > Public > www-style@w3.org > November 2011

RE: [css3-images] Making gradients readable

From: Brian Manthos <brianman@microsoft.com>
Date: Tue, 1 Nov 2011 22:44:17 +0000
To: "L. David Baron" <dbaron@dbaron.org>, fantasai <fantasai.lists@inkedblade.net>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D17044329EE@TK5EX14MBXC264.redmond.corp.microsoft.com>
From: L. David Baron [mailto:dbaron@dbaron.org]
>> Generically, the proposed syntax is:
>>   radial-gradient( <shape-info>
>>                    from <position>
>>                    as <color-stop> [, <color-stop>]+ )
> The thing I don't like is that, in general, I don't like something
> that looks like this:
>  function(foo bar as a, b, c)
> because I think when you have commas inside of functions, it's
> natural to split it like this (because many languages separate
> things inside functional syntax with commas):

>   foo bar as a
>    b
>    c
> rather than splitting it as:
>    foo bar
>    a, b, c
> I thus prefer replacing the "as" with a ",".

Indeed.  This is one of the  reasons I strongly prefer proposal C to  proposal B.

Another reason is that I see the general syntax as:
	<gradient-type>-gradient([<optional-parameters> ,] <color-stop>[, <color-stop>]+)
where <gradient-type> is either "linear" or "radial" for CSS3, and <optional-parameters> resolves to one of

I also believe this easily scales to all gradient types that we might propose for CSS going forward.

A: radial-gradient(1em 2em, 3em 5em, red, orange, yellow)  
B: radial-gradient(3em 5em at 1em 2em as red, orange, yellow)  
C: radial-gradient(3em 5em at 1em 2em, red, orange, yellow)  
D: radial-gradient(shape 3em 5em at 1em 2em as red, orange, yellow)  
Received on Thursday, 3 November 2011 21:09:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:06 UTC