Skip to content

[BUG] attributes are not properly passed on to child elements #104

Open
@Ahrkylien

Description

@Ahrkylien

Describe the bug
Settings like 'fill' in the are not being applied to its child

To Reproduce
Steps to reproduce the behavior:

<svg
  xmlns="http://www.w3.org/2000/svg"
  width="24"
  height="24"
  viewBox="0 0 24 24"
  fill="none"
  stroke="red"
>
  <path stroke-width="2" d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
</svg>

XAML:
<svg:SVGImage
    UriSource="/Resources/Images/edit.svg"
    SizeType="ViewBoxToSizeNoStretch" />

Expected behavior
I expect the same result what you get when:

<svg
  xmlns="http://www.w3.org/2000/svg"
  width="24"
  height="24"
  viewBox="0 0 24 24"
>
  <path
  fill="none"
  stroke="red"
  stroke-width="2" d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" />
</svg>

Screenshots
I get:

Image
but I expect:

Image

Additional context
This example is based on this svg:
https://github.com/tabler/tabler-icons/blob/main/icons/outline/edit.svg

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions