Closed tomasklaen closed 2 years ago
Sorry for spamming you with notifications. I was thinking to use Set
instead of Array
for presentationAttributes
, but in the end I came up with an idea to loop through presentationAttributes
and deleted my other comments.
And thanks again for taking time to implement this feature.
@tomasklaen thanks, will release shortly. I will make it a major version bump because folks could be relying on the implicit attribute cleanup.
Yeah that's wise. The new behavior will definitely cause some icons to now have hardcoded colors, since previously all fill
attributes on svg were being dropped.
107 became too annoying to deal with manually, so here's a PR.
If a
style
or any other presentation attributes are detected on a main<svg>
element, the content of a symbol will be wrapped in<g>
and those attributes transferred to it.List of presentation attributes taken from: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation