Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

<style> tags in SVG files are ignored #1024

Open
evan-dickinson opened this Issue · 3 comments

3 participants

@evan-dickinson

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: mapbox/tilemill#1099

@springmeyer
Owner

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

@evan-dickinson

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 tags by default...</p>

@artemp
Owner

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
Something went wrong with that request. Please try again.