-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(mat-card): Picture elements on mat-cards have incorrect top-margin, when no heading is present #23649
Comments
Fixes that setting `mat-card-image` on a `picture` element doesn't work correctly. Fixes angular#23649.
I've submitted #23678 to fix it. Note that you'll also have to move the |
@crisbeto Thanks for the quick fix! Much appreciated |
Fixes that setting `mat-card-image` on a `picture` element doesn't work correctly. Fixes angular#23649.
Fixes that setting `mat-card-image` on a `picture` element doesn't work correctly. Fixes #23649.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…#23678) Fixes that setting `mat-card-image` on a `picture` element doesn't work correctly. Fixes angular#23649.
Reproduction
Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/components-issue-5lp7n2?file=src/app/example-component.html
Steps to reproduce:
<mat-card>
element with no title, or subtitle<picture>
element with at least one<source>
elementExpected 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/>
tagActual 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
The text was updated successfully, but these errors were encountered: