<style> tags in SVG files are ignored #1024

Open
evan-dickinson opened this Issue Jan 12, 2012 · 3 comments

Comments

Projects
None yet
3 participants

Mapnik doesn't support SVG styling with a <style> tag. I ran into a problem where Illustrator made an SVG file with a <style> tag and it looked OK everywhere except in my map.

I originally filed this issue against TileMIll here: https://github.com/mapbox/tilemill/issues/1099

Owner

springmeyer commented Jan 31, 2012

Can you describe also what you did to work around this (re-exporting right?).

Yeah, I re-exported the SVG to work around this. When you save as SVG, Illustrator gives you an option called "CSS Properties" where you can set how it styles the elements. I don't remember whether it makes <style> tags by default...

Owner

artemp commented Apr 12, 2012

I found :

"..SVG content styled with CSS [CSS2]:

CSS is a widely implemented declarative language for assigning styling properties to XML content, including SVG. It represents a combination of features, simplicity and compactness that makes it very suitable for many applications of SVG. SVG Tiny 1.2 does not require support for CSS selectors applied to SVG content. Authors must not rely on external, author stylesheets to style documents that are intended to be used with SVG Tiny 1.2 user agents."

SVG styling
At the moment we skip <defs> tags all together, but we should support them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment