SVG and external stylesheets

ackit

New Member
I am using some interactive/dynamic SVG on my site and as a feature we have an option to download the .svg file as-is.One problem we discovered is that when external stylesheets are used, the styles get lost if the user, say, tries to open the file in Inkscape. So I have been styling fill and stroke colors, etc., inline on the elements. I am wondering about the SVG standard and how stylesheets fit into it. Are .css files designed to be transported with the .svg file? I understand you can declare external stylesheets like so:\[code\]<?xml-stylesheet type="text/css" href="http://stackoverflow.com/questions/10963925/mystylesheet.css" ?>\[/code\]Will most vector graphics software recognize and load this if they are in the same folder? It seems Illustrator doesn't have initial support for SVG but has add-ons that include JavaScript and CSS3 engines.I can't help but feel like everyone has missed the SVG boat. Has anyone had success doing something like, packaging the .svg with a .css for download and trying this out in various vector graphics programs? What do programs like Inkscape typically do when they save SVG, as there are obviously several ways to assign styles?
 
Top