Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Completely remove Opacity in Toastr.js?

Tags:

css

less

toastr

Is there a way to REMOVE completely the Transparency on Toastr.js? I tried to change the various lines on the .less files

.opacity(@opacity) {
@opacityPercent: 100; // instead of @opacity * 100;
opacity: 1; // instead of @opacity;
-ms-filter:  ~"progid:DXImageTransform.Microsoft.Alpha(Opacity=@{opacityPercent})";
filter: ~"alpha(opacity=@{opacityPercent})";
     }

and every place where it stated opacity(x) where x was not 1 but it still displays opacity.

I also tried to add the following lines on my own CSS

.toast {
   opacity: 1;
}

#toast-container > div {
   opacity: 1; 
}

but i still get the semi opacity on div message display. On mouse over, the div color becomes full (no transparency). I'm trying to always have it full color (no transparency).

like image 794
Johnny Avatar asked Dec 13 '13 17:12

Johnny


1 Answers

The following works with v2.1.3

#toast-container > div {
  opacity: 1;
}

With the !important flag, there would be no fadeIn and fadeOut.

like image 75
Matt McCormick Avatar answered Nov 04 '22 03:11

Matt McCormick