Skip to content

Commit badce96

Browse files
committed
fix(material-experimental/mdc-button): add base css class to all buttons
1 parent 01e4fba commit badce96

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/material-experimental/mdc-button/button-base.ts

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export const MAT_BUTTON_HOST = {
3535
// an unthemed version. If color is undefined, apply a CSS class that makes it easy to
3636
// select and style this "theme".
3737
'[class.mat-unthemed]': '!color',
38+
// Add a class that applies to all buttons. This makes it easier to target if somebody
39+
// wants to target all Material buttons.
40+
'[class.mat-mdc-button-base]': 'true',
3841
'class': 'mat-mdc-focus-indicator',
3942
};
4043

@@ -148,6 +151,9 @@ export const MAT_ANCHOR_HOST = {
148151
// an unthemed version. If color is undefined, apply a CSS class that makes it easy to
149152
// select and style this "theme".
150153
'[class.mat-unthemed]': '!color',
154+
// Add a class that applies to all buttons. This makes it easier to target if somebody
155+
// wants to target all Material buttons.
156+
'[class.mat-mdc-button-base]': 'true',
151157
'class': 'mat-mdc-focus-indicator',
152158
};
153159

src/material/dialog/dialog.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ $mat-dialog-button-margin: 8px !default;
6161
justify-content: center;
6262
}
6363

64-
.mat-button-base + .mat-button-base {
64+
.mat-button-base + .mat-button-base,
65+
.mat-mdc-button-base + .mat-mdc-button-base {
6566
margin-left: $mat-dialog-button-margin;
6667

6768
[dir='rtl'] & {

src/material/expansion/expansion-panel.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
justify-content: flex-end;
7373
padding: 16px 8px 16px 24px;
7474

75-
button.mat-button-base {
75+
button.mat-button-base, button.mat-mdc-button-base {
7676
margin-left: 8px;
7777

7878
[dir='rtl'] & {

0 commit comments

Comments
 (0)