angular / angular/components

mat-icon color doesn't follow the guidelines

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

描述

#### Bug, feature request, or proposal:
mat-icon color doesn't follow the [guidelines](https://material.io/guidelines/style/icons.html)

This example added some extra css to partially fixed the problem, it does so only for the white background theme.
![screen shot 2018-01-29 at 18](https://user-images.githubusercontent.com/30979663/35525564-25694464-0525-11e8-843f-c2cf772296a3.jpg)

#### What is the expected behavior?
All icons should be initialised according to the [guidelines](https://material.io/guidelines/style/icons.html) when color attribute is not explicitly set to "primary", "accent" or "warning".
![screen shot 2018-01-29 at 18 05 05](https://user-images.githubusercontent.com/30979663/35523783-ee96cd4e-051f-11e8-8e78-02ee62e6d71b.png)

#### What is the current behavior?
Icons inherit the properties of the container, most of the time black with 87% opacity.

#### What are the steps to reproduce?
https://material.angular.io/components/icon/overview
https://material.angular.io/components/list/examples (folder icon)
https://material.angular.io/components/datepicker/examples (datepicker icon)
https://material.angular.io/components/form-field/overview (prefixes, suffixes: both text and icon)
https://material.angular.io/components/button/examples (basic icon button, basic fab buttons: which should have also white backgrounds)

#### What is the use-case or motivation for changing an existing behavior?
Consistency with the guidelines, which means less css to write afterwards.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
material 5.1.0

#### Is there anything else we should know?
Progress controls should also have a basic color of black with 54% opacity, so that it will work on the basic fab button. Now the default if primary, which in my opinion is wrong.

贡献指南

打开贡献指南

调研方向

首先重现 Material icon overview 以及所列出的 list、datepicker、form-field 和 button 示例中的图标行为,然后将渲染出的颜色与链接的 Material 指南进行比较。完成的标准是:除非明确设置了 primary、accent 或 warning 颜色,否则图标使用指南默认值,并且进度控件使用所要求的默认不透明度。

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

评估

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

把新 issue 发到你的邮箱

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