Skip to content

Commit

Permalink
fix(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 Jul 19, 2020
1 parent 57f20bf commit 461203a
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 461203a

Please sign in to comment.