FWeinb / grunt-svgstore

Merge svgs from a folder
MIT License
920 stars 94 forks source link

multiple clipPaths; referencing clipPaths without url()? #126

Open nachtfunke opened 7 years ago

nachtfunke commented 7 years ago

So I have a few icons that I sprite together, some of them make use of <clipPath>. All of the icons look fine when I look at them separately, but as soon as I sprite them together, every icon that relies on a clipPath, wouldn't display correctly.

I found out, that my icons (exported in illustrator), reference their own clipPath like <g clip-path="url(#clip-path)">...</g>, with the <clipPath> wrapped in <defs>. And as soon as I remove theurl()from theclip-path=""` attribute, it works again.

Is there a way for svg-store to simply remove this url(), so it just uses the id? Or do you suggest another way around this problem? I realise that this is not a problem with svg-store inherently, but I can't imagine that I am the only one running into this problem. For now, I have to manually edit the created sprite so I can use it.