angular / angular/components

bug(option): mat-options with long text lack of gap since v15

Abierto
#26,701 1 comentario 4 reacciones 0 asignados Ver en GitHub
area: material/select P3 regression
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

Before v15, `mat-option`s with long text were truncated so their height was always 48px and naturally, a gap was there to well separate each option.

Now the text is no more truncated but a min-height of 48px is applied. If the text of a `mat-option` take only one line the gap remains and there is no problem. But with 2 lines of more, the gap is no more and reading becomes more difficult

### Reproduction

https://stackblitz.com/edit/angular-hjwez5?file=src/styles.scss

### Expected Behavior

![image](https://user-images.githubusercontent.com/23034761/221603790-430f1dbb-2142-409d-b93f-07d719ef8216.png)

```css
.mat-mdc-option {
padding-top: 12px;
padding-bottom: 12px;
box-sizing: border-box;
}
```

### Actual Behavior

![image](https://user-images.githubusercontent.com/23034761/221603654-56faf2c9-17e7-4fda-9af6-b95369301b1b.png)

### Environment

- Angular: 15.2.0
- CDK/Material: 15.2.0
- Browser(s): All
- Operating System (e.g. Windows, macOS, Ubuntu): All

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz, especialmente con src/styles.scss, e inspecciona el estilo de mat-option para texto de varias líneas. Se considera terminado cuando se restablezca el espaciado vertical visible entre las opciones con una o más líneas, manteniendo al mismo tiempo el espaciado esperado de 48px para las opciones de una sola línea.

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

Evaluación

Stack tecnológico
angular, css, typescript
Área
design, frontend
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.