angular / angular/components

bug(button): overriding not working as expected.

オープン
#31,475 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンクされている StackBlitz の再現とその src/example/button-overview-example.css から始め、次にボタンの state-layer と ::before のスタッキング動作を調査します。state-layer の opacity が 1 の outlined ボタンにホバーしたときにアウトラインが明確に表示されたままになり、指定された 16 進数の背景オーバーライドも引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, css, typescript
領域
design, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。