bug(mat-list): Bad symmetry on text when line-break in code
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### 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
コントリビューションガイド
調査の方向性
StackBlitz の再現から始め、特に src/app/list-variants-example.ts を確認し、インラインおよび複数行の span コンテンツを用いた、レンダリングされた matListItemTitle と matListItemLine のマークアップを比較します。再現から関連する Angular Material のリスト実装をたどり、複数行のマークアップが先頭または末尾の空白なしでレンダリングされ、リスト項目の対称性が維持されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100