I have tried most options to change the color of header and buttons in ion-alert. What could be the solution?
async resetPin() {
const alert = await this.alertController.create({
header: 'Reset Pin',
cssClass:'alertHeader',
inputs: [
{
name: 'phone',
type: 'number',
placeholder: 'Enter phone number'
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'alertButton',
handler: (blah) => {
alert.dismiss();
}
}, {
...
..
c.scss
.alertHeader {
color: #b52024 !important;
// --color: #b52024 !important;
}
h2.alertHeader {
color: #b52024 !important;
// --color: #b52024 !important;
}
//this works for alertHeader when inspecting in the browser
.alert-sub-title.sc-ion-alert-md, .alert-title.sc-ion-alert-md {
color: #b32224;
}