Skip to content

The module removes "fill" attribute when converting to symbol #67

Description

@dko-slapdash

A bugreport here:

https://github.com/karify/external-svg-sprite-loader/blob/842c04a092665b724a25c9c4ff36b974808a0821/lib/SvgDocument.js#L170

Due to this explicit whitelist of attributes,

<svg width="16" height="16" viewBox="0 0 16 16" fill="none" ...>

becomes

<symbol id="..." viewBox="0 0 16 16">

I.e. fill="none" is removed and thus the image changes.

Maybe we can just copy all attributes (or blacklist some) instead of whitelisting? Because fill may not be the only one attribute...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions