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 icons breaking icon-sprite.svg #1246

Open
nowlena opened this issue May 23, 2018 · 20 comments
Open

SVG icons breaking icon-sprite.svg #1246

nowlena opened this issue May 23, 2018 · 20 comments

Comments

@nowlena
Copy link

nowlena commented May 23, 2018

Expected behavior

When generating icon-sprite.svg via grunt svgstore the sprite should load properly.

Actual behavior

The svg.icons-svg-sprite src gets set to (Unknown) instead of the SVG sprite as intended.

The reason: icon-sprite.svg cannot be loaded due to Namespace prefix sketch for type on path is not defined

I was able to fix the issue by stripping down (ie. removing the "mask" and " sketch:type" attributes) the following SVGs:

  • instagram.svg
  • stumbleupon.svg

Steps to reproduce behavior

Nothing specific, when running the Theme this issue occurred both locally and when bundling then applying to a storefront.

@xpothemes
Copy link

same issue

@karen-white
Copy link

@nowlena @xpothemes I'm having some trouble reproducing this. Could you give me a little more info on the theme version you're using and the exact steps you took when you saw the issue? Thanks!

@nowlena
Copy link
Author

nowlena commented May 26, 2018

Note the source attr:
svg-issue

Some additional information:
Theme Version: 2.0.0
OS: WIndows 10 Pro
Browsers: Chrome 66, Firefox 60, Edge 42

Steps taken to reproduce error:

  • clone theme from BC repo
  • npm install
  • grunt svgstore
  • stencil init
  • stencil start -n

@karen-white
Copy link

Thank you, @nowlena ! I'm seeing the issue now. I'll get a ticket in for this so we can address it.

@sungsation
Copy link

same issue

@lucisousa
Copy link

same issue here too

@techxlers
Copy link

Still facing the same issue. Any solution?

@junedkazi
Copy link
Contributor

@techxlers the solution is in code review here #1258. Hopefully it should be merged in a day or 2.

@techxlers
Copy link

@junedkazi Thanks. BTW I am able to solve the issue by removing following "mask", "sketch:type", "sketch:name", "xlink". Icons are working now :)

@PeteyRev
Copy link
Contributor

Same issue here. Tried implementing fix in #1258 but no luck

@techxlers
Copy link

@PeteyRev Did you try my fix?

@PeteyRev
Copy link
Contributor

@techxlers I did except for the "remove xlink" - Where are you removing that, on the icon files themselves, or when you are adding to html:

<svg>
    <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-chevron-left"></use>
</svg>

@techxlers
Copy link

techxlers commented Jun 13, 2018

@PeteyRev Go to assets/img/icon-sprite.svg file. Open that file in any editor and then find the words which I have mentioned in my previous comment and then simply delete those tags.

@PeteyRev
Copy link
Contributor

@techxlers perfect, thanks! Had to delete the mask element from stumbleupon.svg and its working now

@nowlena
Copy link
Author

nowlena commented Jun 13, 2018

For reference, my initial post here explains how to fix the issue:

I was able to fix the issue by stripping down (ie. removing the "mask" and " sketch:type" attributes) the following SVGs:

  • instagram.svg
  • stumbleupon.svg

@PeteyRev
Copy link
Contributor

@nowlena thanks, I think I may have overlooked that initially. Not enough coffee today

@junedkazi
Copy link
Contributor

Is this still an issue on the latest cornerstone ?

@PeteyRev
Copy link
Contributor

@junedkazi this was an issue for me on version 2.1, so I think so

@aisflat439
Copy link

This is still an issue in 2.2

This still works on 2.2

I was able to fix the issue by stripping down (ie. removing the "mask" and " sketch:type" attributes) the following SVGs:

instagram.svg
stumbleupon.svg

@Bobspadger
Copy link

I am having this same issue on the latest version - is there any update on this?

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