angular / angular/components

bug(mat-button-toggle): letter-spacing not the same as mat-button

オープン
#26,575 コメント 2 件 リアクション 8 件 担当者 0 名 GitHub で見る
area: material/button-toggle P4
主要言語
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

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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。