Edit all your AlertController.create
methods to look like this:
const alert = this.alertCtrl.create({
title: title,
subTitle: msg,
buttons: ['OK'],
cssClass: 'alertCustomCss' // <- added this
});
And add this to app.scss
:
.alertCustomCss {
// text color for basic alerts
color: white;
// alert modal page bg color. Warning this will remove the alert transparency
background-color: color($colors, dark, base);
button {
color: white !important; // button text color
background-color: color($colors, secondary, base) !important;
//button bg color
}
.alert-message {
color: white; // text color for confirm alerts
}
.alert-wrapper {
background-color: color($colors, dark, base); // bg color of alert content
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…