You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(mat-card): Picture elements on mat-cards have incorrect top-margin, when no heading is present #23649
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
changed the title [-]bug(COMPONENT): Picture elements on mat-cards have incorrect top-margin, when no heading is present[/-][+]bug(mat-card): Picture elements on mat-cards have incorrect top-margin, when no heading is present[/+]on Sep 28, 2021
Activity
[-]bug(COMPONENT): Picture elements on mat-cards have incorrect top-margin, when no heading is present[/-][+]bug(mat-card): Picture elements on mat-cards have incorrect top-margin, when no heading is present[/+]fix(material/card): handle picture element as mat-card-image
crisbeto commentedon Oct 2, 2021
I've submitted #23678 to fix it. Note that you'll also have to move the
mat-card-imageattribute to thepictureelement itself.Trombach commentedon Oct 4, 2021
@crisbeto Thanks for the quick fix! Much appreciated
fix(material/card): handle picture element as mat-card-image
fix(material/card): handle picture element as mat-card-image (#23678)
fix(material/card): handle picture element as mat-card-image (#23678)
angular-automatic-lock-bot commentedon Feb 18, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(material/card): handle picture element as mat-card-image (angular…