Skip to content

currentColor is not converted when importing SVG #2276

@cyberalien

Description

@cyberalien

To Reproduce

Steps to reproduce the behavior:

  1. Import this SVG:
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="m9 20l-1.4-1.4l1.75-1.8q-3.2-.425-5.275-1.75T2 12q0-2.075 2.888-3.538Q7.775 7 12 7t7.113 1.462Q22 9.925 22 12q0 1.55-1.663 2.775Q18.675 16 16 16.6v-2.05q1.925-.5 2.962-1.238Q20 12.575 20 12q0-.8-2.137-1.9Q15.725 9 12 9q-3.725 0-5.862 1.1Q4 11.2 4 12q0 .6 1.275 1.438Q6.55 14.275 8.9 14.7l-1.3-1.3L9 12l4 4Z"/></svg>
  1. Select imported path

Expected behavior

Expected to to see a shape with fill.

Actual behavior

  • Fill is missing
  • In Imported SVG Attributes section fill is set to currentColor.

Screenshots

Screenshot 2022-09-16 at 23 23 25

Desktop (please complete the following information):

  • OS (e.g. iOS): macOS 12.5.1
  • Browser & version (e.g. Chrome 89.0): Chrome 105.0

Environment (please complete the following information):

Additional context:

All editors replace currentColor with black color, so I was expecting penpot to behave like that too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expectedmanaged on taigaThis issue has been moved to our project at Taiga.io

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions