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

Id scoping issue #44

Open
MarkusRodler opened this issue Jun 17, 2024 · 0 comments
Open

Id scoping issue #44

MarkusRodler opened this issue Jun 17, 2024 · 0 comments

Comments

@MarkusRodler
Copy link

To prevent conflicts between conflicting identifiers of different SVGs, svg-loader scopes the identifiers and styling rules by adding prefixes.
Thanks for the library. I tried it but it doesn't work the way it is described.

My goal is to load some SVGs that contain several symbols. All symbols have at least a "icon" id and the other symbols have different ones. Think of a arrow SVG and the symbols are: icon, left, right, up and down. If I specify it like that:

<svg><svg data-src="/EyeCon.svg#icon"></svg><use href="#icon"></use></svg>
<svg><svg data-src="/iCon.svg#icon"></svg><use href="#icon"></use></svg>

They will be loading the first symbol with that icon id.
It would be nice if the svg-loader adds predictable prefixes like: EyeCon-icon so that this code works as it should be.

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

No branches or pull requests

1 participant