Skip to content

Can you expose a part="svg" for the SVG content #960

@Mushr0000m

Description

@Mushr0000m

When using it with custom icons : <ion-icon src="assets/icons/wifi.svg"></ion-icon>
Because of the Shadow DOM we can't style at all the content of the SVG. Any custom SVG used is always a square because of the this css lines :

.icon-inner,
.ionicon,
svg {
display: block;
height: 100%;
width: 100%;
}

By adding a part="svg" it would be possible to have more flexibility to style the SVG from the outside. In my case setting height to auto, but it could be to change the color of a specific path or anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues that are suitable for a community contributor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions