Skip to content
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

SVG IDs are not prefixed for *.color.svg files #64

Open
caesarsol opened this issue Sep 13, 2019 · 1 comment
Open

SVG IDs are not prefixed for *.color.svg files #64

caesarsol opened this issue Sep 13, 2019 · 1 comment
Labels

Comments

@caesarsol
Copy link
Contributor

Steps to reproduce

  • Make two SVGs each with a clipPath with the same ID
  • Pass them in SVGO by importing them with accurapp as *.color.svg

Actual behavior

The two IDs clashes, because they are note rewritten, and the second clipPath does not work.

Expected behavior

The IDs should be renamed and prefixed (with filenames).
Easy to do just removing this line:

@marcofugaro do you remember why for *.color.svg the IDs are not prefixed?

@caesarsol caesarsol added the bug label Sep 13, 2019
@marcofugaro
Copy link
Contributor

marcofugaro commented Sep 13, 2019

do you remember why for *.color.svg the IDs are not prefixed?

No idea 😂

Have you tried doing a test with the styles relative to the ID?
For example

<style>
#id { fill: red }
</style>
<path id="id" d="...">

Does it work as well and keeps the styles?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants