FWeinb / grunt-svgstore

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

fixedSizeVersion: reference the original svg #110

Closed Rowno closed 8 years ago

Rowno commented 8 years ago

Changes the <use> element to reference the original svg instead of the fixed size svg in a loop (which crashes the tab in Chrome).

jonathantneal commented 8 years ago

@Rowno, is there an issue for this or would you be available to create a demo of the current failing behavior?

Rowno commented 8 years ago

I don't have the original code anymore because I gave up on it, but I could try recreating it again.

jonathantneal commented 8 years ago

@Rowno, let me know if you’d have time for that. Otherwise, if you can describe the problem with a bit more detail, I can try to recreate it. Just need to verify what this is doing so I can accept the PR :)

Rowno commented 8 years ago

Currently self referential svgs like this are being generated by fixedSizeVersion:

<symbol viewBox="0 0 56 56" id="ico-addons-padded">
    <use xlink:href="#ico-addons-padded" transform="scale(0.6607) translate(9.5, 9.5)"/>
</symbol>

Here's a demo https://gist.github.com/Rowno/fb0254bde3518e0f78b3.

FYI, it doesn't crash Chrome anymore, it just doesn't work.

jonathantneal commented 8 years ago

Thanks, @Rowno. Good stuff. You really went the extra mile to show what was going on. I really appreciate it.

Rowno commented 8 years ago

:blush: