angular / angular/components

bug(button): overriding not working as expected.

Offen
#31,475 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der verknüpften StackBlitz-Reproduktion und ihrer src/example/button-overview-example.css und untersuche anschließend das Stacking-Verhalten der state-layer- und ::before-Elemente des Buttons. Als erledigt gilt die Aufgabe, wenn beim Überfahren eines Outlined-Buttons mit einer state-layer-Opazität von 1 dessen Umriss deutlich sichtbar bleibt und die bereitgestellte hexadezimale Hintergrundüberschreibung weiterhin funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, css, typescript
Bereich
design, frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.