ionic-team / ionic-team/ionicons
Can you expose a part="svg" for the SVG content
- Lenguaje dominante
- TypeScript
- Estrellas
- 18.2k
- Forks
- 2.1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
When using it with custom icons : ``
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.
Guía de contribución
Línea de trabajo
Start with src/components/icon/icon.css lines 27-34 and the icon component rendering used by . Confirm how the custom SVG is inserted, then expose the SVG with part="svg" so callers can style it from outside the Shadow DOM. Done means external styling can target the SVG, including changing its sizing behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- frontend, web-dev
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100