angular / angular/components

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

Abierto
#26,575 2 comentarios 8 reacciones 0 asignados Ver en GitHub
area: material/button-toggle P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Compara los estilos renderizados en las páginas de descripción general de button-toggle y button enlazadas en el issue, y luego rastrea los estilos correspondientes de los componentes de Angular Material. Confirma el espaciado entre letras previsto frente al comportamiento informado y a la especificación de Material 3; se considera terminado cuando los componentes relacionados usan un espaciado coherente y verificado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.