bug(button): overriding not working as expected.
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et son src/example/button-overview-example.css, puis examinez le comportement d’empilement de state-layer et de ::before du bouton. C’est terminé lorsqu’un bouton outlined survolé avec une opacité de state-layer de 1 conserve un contour clairement visible, tandis que la surcharge de l’arrière-plan hexadécimal fournie continue de fonctionner.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, css, typescript
- Domaine
- design, frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100