Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#33,355 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

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

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

描述

area: material/list P3
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. 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.
  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
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 11 小时
30 天内合并 PR
106

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/components 的其他 Issue

查看 angular/components 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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