-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/card
Description
Reproduction
Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/components-issue-5lp7n2?file=src/app/example-component.html
Steps to reproduce:
- Create a
<mat-card>
element with no title, or subtitle - Add a
<picture>
element with at least one<source>
element
<mat-card>
<picture>
<source
srcset="https://material.angular.io/assets/img/examples/shiba2.jpg"
/>
<img mat-card-image />
</picture>
</mat-card>
Expected Behavior
What behavior were you expecting to see?
The top of the image should be flush with the top edge of the card, just like when using an <img/>
tag
Actual Behavior
What behavior did you actually see?
There was a gap between the top edge of the card and the image. This is due to how the css class that overwrites the padding of the card is applied here.
Environment
- Angular:
- CDK/Material: 12.2.7
- Browser(s): Chrome 94, Safari 15
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/card