-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] - Add API prop to prefix style declarations exported by Adobe Illustrator #17
Comments
Hey @jaegz. I see this as more of a build time / preprocessing step, rather than something that should be added to react-svg. Some options I can think of:
Out of curiosity, any chance you can paste that content into a comment so I can copy it? Wouldn't mind playing around with a couple things anyway. |
Hi @tanem thanks for getting back to me and I see what you're saying.
Here's the svg content from the screenshot.
|
@jaegz cool. Just did some digging, apparently in Illustrator there's a CSS properties option you can change when exporting SVGs: http://articles.dappergentlemen.com/2014/12/17/demystifying-illustrator-svg-css/. Hopefully you can use that to stop output of the external I think the above in combination with svgo - plus perhaps one or two plugins - will get your SVGs to a decent point, before react-svg does it's loading. Anyway, will close the issue for now. All the best 👍 |
@tanem Thanks for the extra details on exporting out of Illustrator and going out of your way to do some digging! |
Really digging react-svg! However, I've run into a problem which requires a manual process to correct. When a designer hands over svgs exported from Adobe Illustrator - the generated styles have matching selectors - which causes colors to "spill over" into other svgs. If this component had an api option that steps through and prepends these styles with the something like the svg filename or even a custom string that would be awesome. Right now I have to manually adjust each svg so the styles dont clash and recolor other svgs. I'm sure many users would benefit from this feature.
The text was updated successfully, but these errors were encountered: