One syntax for all types of mat-icon
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Bug, feature request, or proposal:
Feature request
#### What is the expected behavior?
Changing between ligature-based and class-based icon specification shouldn't be a huge chore.
#### What is the current behavior?
To use ligature-based icons, I write `home`. If I want to change from an icon font to a font set that uses CSS classes to pick a glyph, I'd have to change each component by hand to something like ``.
#### What is the use-case or motivation for changing an existing behavior?
I've created a large application that uses dozens of `mat-icon` components, and would like a simple method of changing how they're rendered. Ideally, I'd be able to call something like `setDefaultFontSetClass` once and have all icons (that don't explicitly set a `fontSet` attribute) change their source.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
N/A, mat-icon has always behaved like this
#### Is there anything else we should know?
It would be great if either the `fontIcon` attribute or the component content could be used to select a glyph regardless of how the font set is provided, but I'd be happy to be told to just always use one or the other, as long as switching between types of font set using the icon registry is straightforward.
Guía de contribución
Línea de trabajo
Comienza leyendo el comportamiento del componente mat-icon y las API del registro de iconos descritas en el issue, centrándote en cómo se seleccionan el contenido de ligadura, fontIcon y fontSet. Se considera terminado cuando una aplicación existente de gran tamaño puede cambiar entre fuentes de iconos basadas en ligaduras y basadas en clases mediante una única configuración predeterminada, sin editar cada uso de mat-icon.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100