Skip to content

Commit 619d591

Browse files
authored
fix(material/card): not clearing margin on last button in end alignment (angular#20040)
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 angular#20024.
1 parent ca7d379 commit 619d591

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/material/card/card.scss

+14-1
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,23 @@ $header-size: 40px !default;
203203
// actions panel should always be 8px from sides,
204204
// so the first button in the actions panel can't add its own margins
205205
.mat-card-actions {
206+
&:not(.mat-card-actions-align-end) {
207+
.mat-button,
208+
.mat-raised-button,
209+
.mat-stroked-button {
210+
&:first-child {
211+
margin-left: 0;
212+
margin-right: 0;
213+
}
214+
}
215+
}
216+
}
217+
218+
.mat-card-actions-align-end {
206219
.mat-button,
207220
.mat-raised-button,
208221
.mat-stroked-button {
209-
&:first-child {
222+
&:last-child {
210223
margin-left: 0;
211224
margin-right: 0;
212225
}

0 commit comments

Comments
 (0)