mgcrea / angular-motion

Fancy CSS3 animations for AngularJS 1.2+.
http://mgcrea.github.io/angular-motion
MIT License
449 stars 91 forks source link

Modal background color #18

Open ghost opened 9 years ago

ghost commented 9 years ago

Why background: rgba(0, 0, 0, .5) option is set? It overrides original Bootstrap background, where color can be changed.

dankahle commented 9 years ago

The existing code that utilizes am-fade works currently (on bootstrap 3.2.0 at least), whereas the angular-strap docs offer a user-entered transition solution. The transition solution doesn't set a color and as such, "would" use boots modal background color, and also has the opacity set to .5, so perfect, but... motion's .modal-backdrop.am-fade selector is more specific and as such overrides, and not only that, but overrides black/opacity .5, which coupled with the transition to opacity .5 yields an overall opacity of .25, so ends up being too light at as well.

I favor the idea of adding the transition code to all of motion's animation .less files, then whatever the option.backdropAnimation is set to, it will yield the correct results without user entering code. I tried the transition code from the docs, but the am-fade animation code was messing it up, so needs to be animation code instead. Just put a PR in for it.