bug(Button): Button hover/clickable outside border & missing token
- 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?
- [x] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
When a override is added to a button, the button remains clickable and can be hovered outside the border. I found a token to override this behavior, but I can't get it to work. Additionally, I suggest improving the documentation by specifying the types of values accepted for the token.
```
@include mat.button-overrides((
filled-touch-target-display: none
))
```
https://github.com/user-attachments/assets/11989574-c581-4aff-858b-d77e2368cd3e
Also there is no option to change outline color of outlined button when hovered/focused/pressed, only for disabled state? According to m3 design it should be possible:
https://m3.material.io/components/buttons/specs#4a0c06da-0b2f-47de-a583-97e0ae80b5a5
### Reproduction
StackBlitz link: https://stackblitz.com/edit/q9bg7z8v?file=src%2Fexample%2Fbutton-overview-example-override.scss
Steps to reproduce:
1. Try to move cursor close to the button border
### Expected Behavior
Button should not be clickable or able to hover outside button border
### Actual Behavior
Button is clickable and can be focused outside border
### Environment
- Angular: 19
- CDK/Material: 19.2.1
- Browser(s): Chrome, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz dans src/example/button-overview-example-override.scss et examinez la manière dont mat.button-overrides gère filled-touch-target-display. Comparez la zone de survol, de focus et de clic avec la bordure visible, et vérifiez si les couleurs d’interaction de outlined-button sont configurables ; le travail est terminé lorsque la zone de clic correspond à la bordure et que les valeurs de token acceptées sont documentées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, sass, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100