angular / angular/components

bug(button): overriding not working as expected.

Abierto
#31,475 1 comentario 0 reacciones 0 asignados Ver en GitHub
P3
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?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

To override the background color for a button to a particular hex value provided, the state layer needs to be given an opacity of value 1. However, in doing so, the outline is no longer clearly visible. It appears to get hidden behind the state layer/ ::before pseudo element created.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/wwtmsk43?file=src%2Fexample%2Fbutton-overview-example.css

Hover over the outline button to notice the outline no longer being visible.

### Expected Behavior

When opacity for the state layer is set to 1, the state layer for an outlined button should not hide the outline for the button. The outline should still be visible.

### Actual Behavior

The background's stacking context is higher than the button's stacking context which is hiding the border/ outline.

### Environment

- Angular: 20
- CDK/Material: 20

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz y su src/example/button-overview-example.css; después, inspecciona el comportamiento de apilamiento de state-layer y ::before del botón. Se considera terminado cuando, al pasar el cursor sobre un botón outlined con una opacidad de state-layer de 1, su contorno siga siendo claramente visible y la sobrescritura de fondo hexadecimal proporcionada siga funcionando.

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
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.