bug(mat-button-toggle): letter-spacing not the same as mat-button
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 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
14
### Description
The new `mat-button` use a `letter-spacing` which is calculated as `1.25px` with the default settings. To be more precise:
```
var(--mdc-typography-button-letter-spacing, .0892857143em)
```
whereas the variable `--mdc-typography-button-letter-spacing` is undefined.
For the toggle-button the letter-spacing is used from the `user agent stylesheet` which is set to `normal`.
### Reproduction
Steps to reproduce:
1. Inspect the HTML-code of https://material.angular.io/components/button-toggle/overview
2. https://material.angular.io/components/button/overview
### Expected Behavior
At least that the letter-spacing is consistent over the components.
Additionally I would have expected the same spacing for similar types.
According to the Material 3 specs there is no additional `letter-spacing` set: https://m3.material.io/components/buttons/specs
### Actual Behavior
Width is set `1.25px`
### Environment
Angular CLI: 15.1.3
Node: 19.5.0 (Unsupported)
Package Manager: npm 9.3.1
OS: linux x64
Angular: 15.1.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1501.3
@angular-devkit/build-angular 15.1.3
@angular-devkit/core 15.1.3
@angular-devkit/schematics 15.1.3
@angular/cli 15.1.3
@schematics/angular 15.1.3
rxjs 7.8.0
typescript 4.9.5
贡献指南
调研方向
比较 issue 中链接的 button-toggle 和 button 概览页面上的渲染样式,然后追踪相应的 Angular Material 组件样式。根据报告的行为和 Material 3 规范确认预期的字母间距;相关组件使用一致且经过验证的间距即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100