[Card] Extra margins show when using ripple
See original GitHub issueWhen matRipple
is added to a <mat-card>
, 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
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Adding ripple to mat-card without the card expanding on click ...
The problem is that matRipple adds an zero-height element to the mat-card while Angular Material only removes the margin-bottom from the ...
Read more >Ripple Margin Trading - Buying XRP with Leverage - Coin Guru
Ripple margin trading is a crypto trading strategy whereby you pledge your Ripple (XRP) tokens as collateral to borrow additional funds to purchase...
Read more >The Mystery Behind 20 XRP Fee For Ripple Address - CoinSutra
What Is 20 XRP Ripple Reserve? ... Ripple is a unique crypto asset which has built-in rules of minimum balance for using its...
Read more >Fun with custom:button-card - Dashboards & Frontend
An extra tip on your buttons that have a white background: The button-card defaults to white background if the state of the entity...
Read more >Bootstrap Spacing - examples & tutorial
Responsive spacing with the latest Bootstrap 5. Margin or padding values added to an element or a subset of its sides with simple...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Stumbled on this issue as well. After some inspection, it seems adding and empty (or not empty)
<mat-card-footer>
as the last child solves the issue.https://stackblitz.com/edit/angular-material2-card-ripple-adgv8u
I faced the same issue. I managed to avoid it by using an empty mat-card-footer . In this case :last-child won’t be applied