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 icon classes/id conflicts #136

Open
indraraj26 opened this issue Aug 12, 2021 · 4 comments
Open

svg icon classes/id conflicts #136

indraraj26 opened this issue Aug 12, 2021 · 4 comments

Comments

@indraraj26
Copy link

if you have same id in other svg then the second one will not display.

Is there anyway to force svg to have unique id (via encapsulation)

svg1: https://svgshare.com/i/_7P.svg
svg2: https://svgshare.com/i/_6v.svg

@czeckd
Copy link
Owner

czeckd commented Aug 12, 2021

No, see the open issue #73. Creating unique ids is a requested enhancement that I've not had time to implement as of yet.

@indraraj26
Copy link
Author

I checked #73 but still it is hacky way and you will have to do it for all svg which is quite lot of works.

Btw overall this is really great package. I appreciate your efforts to maintain this package.

I was also thinking how we can give unique id to path, g, clipath is also there. We might need to find the way to encapsulate each svg-icon component just like angular does it with viewEncapsulation.emulated or default

If you think this can be close feel free to do it.

@Teebo
Copy link

Teebo commented Sep 20, 2021

@indraraj26 you can try this package: https://www.npmjs.com/package/ngx-svg-schematic

@kuncevic
Copy link

You can save the svg's rather with unique classes names or inline styles, that would fix that problem

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

No branches or pull requests

4 participants