W3C home > Mailing lists > Public > www-style@w3.org > December 2007

Re: [Proposal] CSS gradients

From: Doug Schepers <schepers@w3.org>
Date: Mon, 10 Dec 2007 09:08:09 -0500
Message-ID: <475D4849.4090101@w3.org>
To: www-style CSS <www-style@w3.org>


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.

-Doug Schepers
W3C Staff Contact, SVG, CDF, and WebAPI
Received on Monday, 10 December 2007 14:08:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:32 UTC