angular / angular/components

[Card] Extra margins show when using ripple

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

説明

When `matRipple` is added to a ``, the card expands on click.

Reproduction: https://stackblitz.com/edit/angular-1mherw?file=app/card-overview-example.html

This is due to the styling rule that says every element in the card except for the last should have bottom margin. When the ripple is added, the last element is no longer last and so it gains the margin bottom.

https://github.com/angular/material2/blob/master/src/lib/card/card.scss#L190

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

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

調査の方向性

src/lib/card/card.scss#L190 付近のスタイルルールから始め、リンクされている StackBlitz の再現を使って、matRipple を mat-card に追加したときのカードの拡張を確認します。カードがクリック時に余分な下マージンを持たなくなり、拡張もしなくなったうえで、既存のカードの間隔の挙動が維持されれば修正完了です。

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

評価

技術スタック
angular
領域
frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
38/100

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

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