Closed Lab43 closed 10 years ago
I hear you. We'd prefer not to revert, and we're trying to eliminate JS animations from the framework wherever possible (for code complexity reasons, and performance, especially on mobile devices where CSS animations get hardware accelerated).
I'd love if we can find a way to include other styles of transition without reverting to JS animations – happy to entertain suggestions / PRs on that score.
I understand where you're coming from. I'll work on a patch that adds a CSS3 slideUp transition in addition to the fade transition.
However, I don't think that the CSS transition is getting used. The jQuery fallback is being used in all cases: https://github.com/zurb/foundation/issues/4870. I'll work on a patch for that too.
We used to be able to customize the animation used to close alert boxes, but this ability was removed with pull request #4573. The goal of this pull request was to use CSS animations instead of jQuery animations. I understand the motivation behind this, but I think it was a mistake. The performance gains aren't worth the loss of functionality.
The fade animation isn't always a good choice. It causes the page to jump up after the animation completes, which can be jarring. We swapped it out for the slideUp animation, which creates a very nice smooth transition. I'm sure many other users have done the same. See #2897.
I think we should either revert #4573 (and #4575) or find a compromise that allows us to choose between a CSS fade transition and any jQuery animation.