Angular Material Button Disable Style Change

Viewed 17841

form.html

<md-button class="md-raised md-primary pull-right formPage" ng-disabled="formPage.$invalid" ng-click ="submit()">SAVE</md-button>

css

.md-button.md-raised.md-primary.formPage {
    position: right !important;
    color: #FFFFFF;
    background-color:#008cba;    
}

Button is disabled but it has custom color from my css. How can i show the default disable style or maybe change button color if it is disable ?

Jsfiddle

3 Answers

Overriding following css class worked for me (Angular-Material v12 Button mat-stroked):

.mat-stroked-button.mat-button-disabled.mat-button-disabled {    

color: #FFFFFF;
background-color: #008cba

}
Related