Skip to content

Id scoping issue #44

@MarkusRodler

Description

@MarkusRodler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions