bug(mat-list): Bad symmetry on text when line-break in code
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
v14
### Description
The text in both matListItemTitle and matListItemLine creates a whitespace at the start and end of the text when the code is broken over multiple lines. This breaks the symmetry of the list items as seen in this example on the docs page

### Reproduction
Stackblitz of the issue already showing in the docs page:
https://stackblitz.com/run?file=src%2Fapp%2Flist-variants-example.ts
Works:
`Text`
Creates extra spacing:
```
Text
```
### Expected Behavior
Expect the result not to have white spaces when rendered, or to ignore the white spaces. As it worked in v14.
### Actual Behavior
Gets an extra white space when the code has line break inside tag. Breaks symmetry
### Environment
- Angular: latest v15
- CDK/Material: latest v15
- Browser(s): All
- Operating System (e.g. Windows, macOS, Ubuntu): All
Guía de contribución
Línea de trabajo
Comienza con la reproducción de StackBlitz, particularmente con src/app/list-variants-example.ts, y compara el marcado renderizado de matListItemTitle y matListItemLine con contenido de span en línea y multilínea. Sigue la implementación relevante de listas de Angular Material a partir de la reproducción y verifica que el marcado multilínea se renderice sin espacios en blanco iniciales ni finales y conserve la simetría de los elementos de lista.
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
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100