Skip to content

Commit

Permalink
fix(material-experimental/mdc-button): add base css class to all butt…
Browse files Browse the repository at this point in the history
…ons (#18422)

(cherry picked from commit d191329)
  • Loading branch information
andrewseguin authored and jelbourn committed Mar 3, 2020
1 parent 8efa2f2 commit 144cb41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-button/button-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export const MAT_BUTTON_HOST = {
// an unthemed version. If color is undefined, apply a CSS class that makes it easy to
// select and style this "theme".
'[class.mat-unthemed]': '!color',
// Add a class that applies to all buttons. This makes it easier to target if somebody
// wants to target all Material buttons.
'[class.mat-mdc-button-base]': 'true',
'class': 'mat-mdc-focus-indicator',
};

Expand Down Expand Up @@ -152,6 +155,9 @@ export const MAT_ANCHOR_HOST = {
// select and style this "theme".
'[class.mat-unthemed]': '!color',
'class': 'mat-mdc-focus-indicator',
// Add a class that applies to all buttons. This makes it easier to target if somebody
// wants to target all Material buttons.
'[class.mat-mdc-button-base]': 'true',
};

/**
Expand Down
3 changes: 2 additions & 1 deletion src/material/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ $mat-dialog-button-margin: 8px !default;
justify-content: center;
}

.mat-button-base + .mat-button-base {
.mat-button-base + .mat-button-base,
.mat-mdc-button-base + .mat-mdc-button-base {
margin-left: $mat-dialog-button-margin;

[dir='rtl'] & {
Expand Down
2 changes: 1 addition & 1 deletion src/material/expansion/expansion-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
justify-content: flex-end;
padding: 16px 8px 16px 24px;

button.mat-button-base {
button.mat-button-base, button.mat-mdc-button-base {
margin-left: 8px;

[dir='rtl'] & {
Expand Down

0 comments on commit 144cb41

Please sign in to comment.