ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
128 stars 85 forks source link

Backdrop opacity customization #56

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Short description of the problem:

The current backdrop implementation, on ionic 2, doesn't let us customize the backdrop opacity. It's hardcoded.

What behavior are you expecting?

It should allow the option to change the opacity from and to values

Which Ionic Version? 1.x or 2.x Ionic 2 - 2.0.0-rc.2

SergioSuarezDev commented 4 years ago

I’ve do it using the cssClass property in alertController (Ionic 4)

  async alertError(message: string) {
    const alert = await this.alertController.create({
      cssClass: 'alertClass',
      animated: true,
      header: 'Error',
      message,
      buttons: ['OK']
    });
    await alert.present();
  }
 ion-alert {
   &.alertClass{
     background: rgb(0,0,0,.8);
   }
 }