Skip to content

Commit

Permalink
fix(material/card): not clearing margin on last button in end alignment
Browse files Browse the repository at this point in the history
We have some styles that clear the margin from the first button, but we didn't apply the
same to the last button if the card actions are aligned towards the end.

Fixes #20024.
  • Loading branch information
crisbeto committed Jan 8, 2021
1 parent 4b16025 commit 5c60918
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/material/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,23 @@ $mat-card-header-size: 40px !default;
// actions panel should always be 8px from sides,
// so the first button in the actions panel can't add its own margins
.mat-card-actions {
&:not(.mat-card-actions-align-end) {
.mat-button,
.mat-raised-button,
.mat-stroked-button {
&:first-child {
margin-left: 0;
margin-right: 0;
}
}
}
}

.mat-card-actions-align-end {
.mat-button,
.mat-raised-button,
.mat-stroked-button {
&:first-child {
&:last-child {
margin-left: 0;
margin-right: 0;
}
Expand Down

0 comments on commit 5c60918

Please sign in to comment.