Skip to content

Commit 626d26e

Browse files
committed
fix(material/card): handle picture element as mat-card-image
Fixes that setting `mat-card-image` on a `picture` element doesn't work correctly. Fixes #23649.
1 parent 467e43b commit 626d26e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/material/card/card.scss

+8
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ $header-size: 40px !default;
7373
.mat-card-image {
7474
width: calc(100% + #{$padding * 2});
7575
margin: 0 (-$padding) 16px (-$padding);
76+
77+
// The following properties are to handle `mat-card-image` on a `picture` element.
78+
display: block;
79+
overflow: hidden;
80+
81+
img {
82+
width: 100%;
83+
}
7684
}
7785

7886
.mat-card-footer {

0 commit comments

Comments
 (0)