Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular Material Button Disable Style Change

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

like image 820
Mad-D Avatar asked May 30 '26 19:05

Mad-D


1 Answers

the css should be

.md-button.md-raised.md-primary.formPage:not([disabled])

see http://jsfiddle.net/apxbutmf/

like image 71
sdfacre Avatar answered Jun 02 '26 19:06

sdfacre