Re: [Proposal] CSS gradients


Antoine Quint wrote (on 12/9/2007 8:38 AM):
> On 9 déc. 07, at 13:31, Charles A. Landemaine wrote:
>> Nice. Is it possible to use a data: URI to embed an SVG file? At least
>> that would help.
> Yes, absoutely (although I don't have an example handy). Also, you don't 
> have to create an SVG document for each asset you want to reference via 
> CSS, you should be able to create a single (gzip'd) SVG file that has 
> all the assets your style sheet needs, and which would be cached across 
> pages. You could then target each individual asset with 
> mySVGAssets.svg#aParticularAssetId.

For that matter, you could simply inline the SVG assets inside an XHTML 
document (using namespaces), and hopefully inside an HTML5 document 
(still working out the kinks in that).  You could put them in a <defs> 
element to prevent them from rendering (though gradients don't render by 
themselves, other assets might).  Referencing them using CSS would then 
be trivial, and would require no more connections than is necessary for 
loading the X/HTML and CSS documents.

-Doug Schepers
W3C Staff Contact, SVG, CDF, and WebAPI

Received on Sunday, 9 December 2007 15:51:43 UTC