Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(card): uneven action button margin #13390

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions src/material/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
$mat-card-padding: 16px !default;
$mat-card-border-radius: 4px !default;
$mat-card-header-size: 40px !default;
$mat-card-button-margin: 8px !default;

.mat-card {
@include mat-elevation-transition;
Expand Down Expand Up @@ -84,10 +85,8 @@ $mat-card-header-size: 40px !default;
}

.mat-card-actions {
.mat-button,
.mat-raised-button,
.mat-stroked-button {
margin: 0 8px;
.mat-button-base {
margin: 0 $mat-card-button-margin;
}
}

Expand Down Expand Up @@ -202,14 +201,21 @@ $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 {
.mat-button,
.mat-raised-button,
.mat-stroked-button {
&:first-child {
margin-left: 0;
margin-right: 0;
}
.mat-card-actions .mat-button-base:first-child {
margin-left: 0;

[dir='rtl'] & {
margin-left: $mat-card-button-margin;
margin-right: 0;
}
}

.mat-card-actions .mat-button-base:last-child {
margin-right: 0;

[dir='rtl'] & {
margin-right: $mat-card-button-margin;
margin-left: 0;
}
}

Expand Down