Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion src/material/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,19 @@ export class MatButton extends _MatButtonMixinBase
@Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode: string) {
super(elementRef);

// For each of the variant selectors that is prevent in the button's host
// For each of the variant selectors that is present in the button's host
// attributes, add the correct corresponding class.
for (const attr of BUTTON_HOST_ATTRIBUTES) {
if (this._hasHostAttributes(attr)) {
(this._getHostElement() as HTMLElement).classList.add(attr);
}
}

// Add a class that applies to all buttons. This makes it easier to target if somebody
// wants to target all Material buttons. We do it here rather than `host` to ensure that
// the class is applied to derived classes.
elementRef.nativeElement.classList.add('mat-button-base');

this._focusMonitor.monitor(this._elementRef, true);

if (this.isRoundButton) {
Expand Down
5 changes: 1 addition & 4 deletions src/material/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ $mat-dialog-button-margin: 8px !default;
justify-content: center;
}

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

[dir='rtl'] & {
Expand Down