diff --git a/src/material/card/card.scss b/src/material/card/card.scss index d53ad1cff994..8c00a62a8f81 100644 --- a/src/material/card/card.scss +++ b/src/material/card/card.scss @@ -203,10 +203,23 @@ $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; }