scotch-io/scotch-panels

Firefox Animation Issues - Clickable Overlay

Open

#30 opened on Apr 30, 2015

View on GitHub
 (1 comment) (0 reactions) (0 assignees)HTML (604 stars) (103 forks)batch import
help wanted

Description

I've run into some issues trying to animate the clickable overfly in firefox.

I started with this example http://codepen.io/ncerminara/pen/EdaBm

Everything works well except for the fadeIn on the overlay. Tested in Safari and Chrome and works fine.

Haven't found a solution yet.

Here's the altered css I used:

.overlay {
  // Overlay base styles
  position: fixed;
  background: rgba(0, 0, 0, 0.75);
  width: 100%;
  height: 100%;
  display: none;
  z-index: 999999;
  cursor: pointer;

  // Set transition for overlay
  -webkit-transition:         all 425ms ease;
  -moz-transition:            all 425ms ease;
  -ms-transition:             all 425ms ease;
  -o-transition:              all 425ms ease;
  transition:                 all 425ms ease;


  // Set the animation duration
  -webkit-animation-duration:   1.1s;
  -moz-animation-duration:      1.1s;
  -ms-animation-duration:       1.1s;
  -o-animation-duration:        1.1s;
  animation-duration:           1.1s;

  // Set the animation fill mode
  -webkit-animation-fill-mode:  both;
  -moz-animation-fill-mode:     both;
  -ms-animation-fill-mode:      both;
  -o-animation-fill-mode:       both;
  animation-fill-mode:          both;

  // Name the Animation
  -webkit-animation-name:       fadeIn;
  -moz-animation-name:          fadeIn;
  -ms-animation-name:           fadeIn;
  -o-animation-name:            fadeIn;
  animation-name:               fadeIn;
}

// When is show class is applied
// made the overlay display block
.scotch-is-showing .overlay {
  display: block;
}

// Setup keyframes animations
// Chrome
@-webkit-keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

// Firefox
@-moz-keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

// Opera
@-o-keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

// All other browsers
@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

Contributor guide