-
Notifications
You must be signed in to change notification settings - Fork 272
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
Icons with masks are displayed as if without masks #288
Comments
Was about to report the same problem with filters and gradients. I guess it's because how svg links those def's using |
@kisenka can you help? |
@0pt1m1z3r could you please create repo with minimal setup to demonstrate a problem (package.json, webpack config, SVG image and piece of your code). If you don't want to create a repository - you can create a gist with multiple files. |
@kisenka can you help? |
I it'a browsers issue, how they render external SVGs in sprite stack. If you guys tell me how to transform an SVG to get it work - I'll be glad to update sprite generator. The only thing I can suggest is to use SVG sprite inlined directly on the page. I've created a PR 0pt1m1z3r/svg-test#1 to demonstrate how it can be done. |
@0pt1m1z3r BTW if refer to SVGs from CSS all works fine :) |
Thank you. I will continue to investigate this problem |
@0pt1m1z3r can I close this one? |
@kisenka Yes, you can. I use the solution via css. |
Hi there, just chiming in to help future readers of this bug. If you need to load a sprite via a You can fix that by running something like this after loading the sprite: document
.querySelectorAll('#__SVG_SPRITE_NODE__ symbol mask')
.forEach(element =>
document.querySelector('#__SVG_SPRITE_NODE__').appendChild(element) This workarounds moves |
Fixed in [email protected] |
Do you want to request a feature, report a bug or ask a question?
Bug
What is the current behavior?

Icons with masks are displayed as if without masks
What is the expected behavior?
Masks must be applied correctly
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
It you don't want to create a repository - create a gist with multiple files
https://github.com/0pt1m1z3r/svg-test
If this is a feature request, what is motivation or use case for changing the behavior?
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
In Chrome 67.0.3396.87:
Source svg icon - correct
Svg icon from sprite - correct
Svg icon from sprite in img tag - correct
Svg icon from sprite in use tag - incorrect
In Firefox 60.0.2:
Source svg icon - correct
Svg icon from sprite - incorrect
Svg icon from sprite in img tag - incorrect
Svg icon from sprite in use tag - incorrect
The text was updated successfully, but these errors were encountered: