Re: [Proposal] CSS gradients

Hi, all!

I like this proposal. SVG already uses CSS for some styling. Why not  
declare a gradient to be similar to a color in CSS and use that model  
for both HTML and SVG? That way, when the 'next big thing' comes  
along in XML, if it needs colors and gradients, it can just use what  
already exists in CSS.

Future expansions can be added to CSS, if the group decides they want  
the additional 'expense' of more complex color schemes or gradients.

On Dec 10, 2007, at 6:08 AM, Doug Schepers wrote:

>
> Hey-
>
> David Hyatt wrote (on 12/10/2007 2:58 AM):
>> Yeah, we've been toying with the idea of adding gradients to  
>> WebKit and had settled on pretty much exactly this syntax.  I  
>> think gradients should be part of CSS, and that requiring SVG is  
>> overkill.
>
> I'm actually inclined to agree, and sent an email to the SVG WG to  
> that effect, for discussion at tomorrow's telcon.
>
> Gradients are just a fill (even in SVG), and with a simple fill  
> such as is proposed, I see no reason it can't be defined natively  
> in CSS. Obviously, it's best if it's defined in a way that's  
> compatible to SVG, so authors only have to learn one model (even if  
> it's a different syntax).
>
> Both linear and radial gradients should be fairly simple to define  
> as a fill.  The color value should perhaps be RGBA to allow for  
> opacity (note that this may be slightly incompatible with SVG's  
> color model, which uses a separate opacity presentation property/ 
> attribute, but I expect there would a one-to-one match in most  
> typical color spaces).
>
> That the SVG WG has been collaborating with the developers of  
> Inkscape to design a more advanced gradient, something like a  
> mesh.  I expect that this would be harder to define in CSS, but I'm  
> not sure it's strictly necessary to do so; CSS could simply have a  
> subset of SVG's gradient functionality, and if the author needed  
> more, they could use the more involved X/HTML+SVG+CSS combination.
>
> Again, I haven't discussed this yet with the SVG WG, but on the  
> face of it, I see no serious impediments should there be interest  
> in the CSS WG to take this up.  I would ask that the SVG WG be  
> involved in the discussions so we don't trip over one another and  
> complicate things for both authors and implementors.
>
> Regards-
> -Doug Schepers
> W3C Staff Contact, SVG, CDF, and WebAPI
>

Received on Monday, 10 December 2007 15:49:58 UTC