- From: Doug Schepers <schepers@w3.org>
- Date: Mon, 16 Mar 2009 13:18:18 -0400
- To: www-svg@w3.org
Hi, Jeff- Jeff Schiller wrote (on 3/16/09 9:15 AM): > On 3/16/09, Stéphane Daviet<stephane.daviet@gmail.com> wrote: >> >> First, SVG is XML, so it would be great to be able to get some CSS like >> mechanisms to simply change the appearance (colors for instance) of a file. >> >> I would also be great to be able to declare some colors externaly and reuse >> them as constants. > > Paint Servers: http://www.w3.org/TR/SVGTiny12/painting.html#PaintServers > > file1.svg: > <svg ...> > <defs> > <solidColor id="fooColor" solid-color="#4488aa" /> > </defs> > </svg> > > file2.svg: > <svg ...> > <rect fill="url(file1.svg#fooColor)" ... /> > </svg> Yes, <solidColor> seems to fit the bill there (if I understand his use case). FWIW, since Opera is the only one of the desktop browsers that supports <solidColor> (yay, Opera!), I often use a hack to achieve a similar effect, which is to use a one-stop gradient (either linear or radial, doesn't matter) with the desired color. It should be pretty trivial for the other browsers to support <solidColor> down the road. Regards- -Doug Schepers W3C Team Contact, SVG and WebApps WGs
Received on Monday, 16 March 2009 17:18:29 UTC