Search code examples
ionic3

Ionic change font color of disabled button


How do I change the font color of an disabled button?

I have:

 <ion-col col-1><button class='buttoncell abc noactualbutton' ion-button [disabled]="true" [color]="white">{{row[8]}}</button></ion-col>

and SCSS:

   .noactualbutton[disabled]{
      color: rgb(255, 255, 255) !important;
    }

But still, it is "whiter", but its still greyed out...


Solution

  • When you disable button opacity is set 0.4 automatically. You can set your styling to button when it is disabled like below:

    .noactualbutton:disabled, noactualbutton[disabled]{
          color: white;
          opacity: 1;
          background: #b3b3b3;
      }