-
Notifications
You must be signed in to change notification settings - Fork 73
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
Option to pass svg path into the prefixID plugin? #85
Comments
I'd be glad to help with a PR if you could just lay out what needs to be done both in this repo and in |
I was looking into the Good to know someone else is using inlineStyles to to fix this. Thanks for the help :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The prefixIDs plugin in svgo accepts a path option passed into it via the options object in the
optimize
method. Examples here and here.This is very useful in cases when a lot of the svgs in a project are exported from Adobe Illustrator and have classes like
st0
,st1
. All the svgs have the same classes and the styles get messed up because of this.Prefixing the svg classes with the relative paths is a nice way to ensure this does not happen. I guess the same could be acheived by prefixing a random value but the path option is nicer cause it's more readable while debugging.
The text was updated successfully, but these errors were encountered: