ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

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

Open Mushr0000m opened this issue 4 years ago • 5 comments

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 : https://github.com/ionic-team/ionicons/blob/8c2a507fcff2cb5f2edff60357ffd7feb70bb987/src/components/icon/icon.css#L27-L34 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.

Mushr0000m avatar Apr 16 '21 22:04 Mushr0000m

Please this is really needed

tolutronics avatar Oct 07 '21 20:10 tolutronics

really needed!!!!!!!!!!!!!!!!!!!!!!!

masecho avatar Oct 09 '21 03:10 masecho

Is there any update on this? It would be very useful for us as well

infomus avatar Dec 08 '23 02:12 infomus

Same with me, exposing parts of the shadow dom would really make a differnce, at least for custom svg icons.

m0n0mind avatar Jan 12 '24 09:01 m0n0mind