Svg-sprite-loader: Attributes are missing after <svg> is converted to <symbol>

Created on 22 Sep 2017  路  2Comments  路  Source: JetBrains/svg-sprite-loader

Do you want to request a feature, report a bug or ask a question?
Bug + feature

What is the current behavior?
Most attributes on <svg> elements are stripped. Looks like this was fixed for stroke and fill attributes in https://github.com/kisenka/svg-sprite-loader/issues/141 .

What is the expected behavior?
At least fill-* and stroke-* attributes should be preserved. There's actually quite a lot of possible attributes that may be desirable to keep so I suggest this be customisable by the developer.

If this is a feature request, what is motivation or use case for changing the behavior?
Defining attributes directly on the <symbol> results in smaller file size compared to declaring them on each internal element including on <g>. Allowing the developer to choose what attributes to keep allows for a finer level of customizability.

Please tell us about your environment:

  • Node.js version: 8.5
  • webpack version: 3.6
  • svg-sprite-loader version: 3.2.5
  • OS type & version: Linux, Fedora Linux x86_64

Most helpful comment

@MaxMilton sorry for the delay, this shipped in [email protected].

All 2 comments

@MaxMilton sorry for the delay, this shipped in [email protected].

Thank you very much :heart:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Emiliano-Bucci picture Emiliano-Bucci  路  6Comments

hongkongk picture hongkongk  路  3Comments

timkelty picture timkelty  路  7Comments

fruchtose picture fruchtose  路  5Comments

gzaripov picture gzaripov  路  3Comments