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

[Bug] Svgs that use clip-path() ids can't be used more than once. #71

Closed
jmckinnell opened this issue Dec 9, 2020 · 0 comments · Fixed by #120
Closed

[Bug] Svgs that use clip-path() ids can't be used more than once. #71

jmckinnell opened this issue Dec 9, 2020 · 0 comments · Fixed by #120
Assignees
Labels
bug Something isn't working

Comments

@jmckinnell
Copy link
Member

Describe the bug

If I include more than one of the same SVG and that SVG uses clip-path="url(#ar-clip0)" they will end up using the same clip-path. This causes the first SVG to disappear as it's referencing the second SVGs clip-path.

We need to find a way to process the SVG and create unique ids for the SVG. Currently, we're using https://github.com/airbnb/babel-plugin-inline-react-svg with svgo to inline the SVGs. They are aware of the issue but there hasn't been a proposed fix because of some conflicts with the latest version of svgo airbnb/babel-plugin-inline-react-svg#57

To Reproduce

  1. Import an SVG
  2. Use it twice on the page
  3. See one of the SVGs disappear.

Expected behaviour

Both SVGs are visible.

@jmckinnell jmckinnell added the bug Something isn't working label Dec 9, 2020
@DonghyukJacobJang DonghyukJacobJang linked a pull request Jun 25, 2021 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants