bug(mat-list): Bad symmetry on text when line-break in code
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Beginne mit der StackBlitz-Reproduktion, insbesondere mit src/app/list-variants-example.ts, und vergleiche das gerenderte matListItemTitle- und matListItemLine-Markup mit Inline- und mehrzeiligem span-Inhalt. Verfolge die relevante Angular-Material-Listenimplementierung aus der Reproduktion und überprüfe, dass mehrzeiliges Markup ohne führende oder nachgestellte Leerzeichen gerendert wird und die Symmetrie der Listenelemente erhalten bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100