angular / angular/components

bug(MatList): Angular Material List feature doesn't respect M3 specs

未关闭
#33,355 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area: material/list gemini-triaged P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

The MatList component in Angular Material does not fully adhere to the [Material Design 3 (M3) specifications for Lists](https://m3.material.io/components/lists/specs). Specifically:

- Icon alignment: Leading icons are not vertically centered as per M3 specs (should be 16px from the top/bottom of the list item).
- Padding: List items do not use the correct horizontal padding (16px for single-line, 24px for two-line).
- Typography: Text styles (e.g., mat-line) do not match M3’s typography tokens (e.g., body-large for primary text).
- etc...

In general, the visual consistency with the M3 design system is broken especially with "mutline" list items or with meta and/or actions (primary, secondary, menu). Furthermore, override API cannot help with some aspects like gaps and positionning.

### Reproduction

Steps to reproduce:
1. Create a MatList with leading icons and multi-line text.
2. Inspect the rendered DOM and compare with [M3 List specs](https://m3.material.io/components/lists/specs).
3. Observe misalignment in icon positioning, incorrect padding, or typography mismatches.

### Expected Behavior

M3 spec is respected.

### Actual Behavior

Lots of "legacy" M2 (?) design choices applied.

### Environment

- Angular: 22
- CDK/Material: 22
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

贡献指南

打开贡献指南

调研方向

从 MatList 组件开始,在 Chrome 中使用前置图标和多行文本重现该问题。将渲染后的 DOM 和视觉行为与链接的 Material Design 3 List 规范进行比较,重点关注图标对齐、水平内边距、排版、间距和操作项定位。受影响的列表变体符合所述 M3 要求即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
design, frontend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。