You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature, report a bug or ask a question?
Bug report
What is the current behavior?
The symbols I import don't look like they should. They have no stroke like in the preview but a black fill after loaded with svg-sprite-loader.
Only the children of the <svg> element are extracted into the sprite.
Imported icons that have styling attributes like fill or stroke directly on the <svg> element were extraced to the sprite without these attributes.
What is the expected behavior?
Styling attributes that came from svg tags should be kept in the symbols inside the sprite.
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
I was importing an icon set called feather-1.1.0 to my repository
I used the webpack loader to Import the Icons in my JS code like that:
import anchor from "../../icons/feather-1.1.0/anchor.svg";
// using react here
const test = (
<svg viewBox={anchor.viewBox} style={{ width: "20px", height: "20px" }}>
<use xlinkHref={anchor.url} />
</svg>
);
If this is a feature request, what is motivation or use case for changing the behavior?
Please tell us about your environment:
Node.js version: v6.9.2
webpack version: 3.0.0
svg-sprite-loader version: 3.0.5
OS type & version: Windows 10
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
Do you want to request a feature, report a bug or ask a question?
Bug report
What is the current behavior?
The symbols I import don't look like they should. They have no stroke like in the preview but a black fill after loaded with svg-sprite-loader.
Only the children of the
<svg>
element are extracted into the sprite.Imported icons that have styling attributes like
fill
orstroke
directly on the<svg>
element were extraced to the sprite without these attributes.What is the expected behavior?
Styling attributes that came from svg tags should be kept in the symbols inside the sprite.
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
Here is my webpack config:
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)
anchor.svg (original icon)
extracted sprite:
The text was updated successfully, but these errors were encountered: