bug(MatButton): FAB with disabled state using alpha on background collisions
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
### 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
Because the disabled state background color is defined with alpha, FAB collide with page contents when disabled. There's no guideline anywhere stating that FAB should never get disabled, and a disabled FAB is even part of the documentation.
FAB stands for Floating Action Button according to https://m3.material.io/components/floating-action-button/overview so it should be assumed most uses will be with absolute or fixed positioning.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/4rnhsm?file=src%2Findex.html,src%2Fexample%2Fbutton-overview-example.html,src%2Fexample%2Fbutton-overview-example.css
Steps to reproduce:
1. Have a FAB button
2. Make it disabled
### Expected Behavior
The button doesn't get visually mixed with the page contents. One potential solution would be to make the disabled state not use alpha.
### Actual Behavior
Page contents as partially visible background on the button decrease its readability.
### Environment
- Angular: 17.0
- CDK/Material: 17.0
- Browser(s): any
- Operating System (e.g. Windows, macOS, Ubuntu): any
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la riproduzione StackBlitz, in particolare src/index.html, src/example/button-overview-example.html e src/example/button-overview-example.css, e conferma la collisione dello sfondo del FAB disabilitato. Segui lo stile MatButton del FAB disabilitato dalla riproduzione e verifica che il contenuto del FAB disabilitato rimanga leggibile sopra il contenuto della pagina senza dipendere da una restrizione di posizionamento non documentata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, css, typescript
- Ambito
- design, frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100