angular / angular/components

bug(button): overriding not working as expected.

Đang mở
#31,475 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và src/example/button-overview-example.css của nó, sau đó kiểm tra hành vi xếp chồng của state-layer và ::before của button. Hoàn tất khi việc di chuột lên một button outlined có opacity của state-layer là 1 vẫn giữ cho outline hiển thị rõ ràng, đồng thời override background dạng hex được cung cấp vẫn hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, css, typescript
Lĩnh vực
design, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.