top | item 12609271

First, Last, Invert, and Play: a technique for animations using CSS transforms

64 points| noahgrant | 9 years ago |engineering.siftscience.com

14 comments

order

mcav|9 years ago

On Safari, both of these examples flash the underlying panel before the transition takes place. On Firefox, the transition is quite choppy. Is this just me? (I'm sure there's a simple fix, i.e. maybe one of the layers isn't getting composited the whole time...)

noahgrant|9 years ago

Thanks for pointing those out! Indeed we have to make extra corrections to make it work correctly on Safari, but the examples left those out to try to make them easier to follow.

What version of Firefox are you using? The first example I find to definitely be choppier on Firefox, but the last one looks pretty good.

noahgrant|9 years ago

Oddly enough, removing the outer raf (on line 59) will remove the flicker in Safari but then break the animation in firefox. I'll see if I can figure that out, I must have a bug somewhere. We actually don't use the outer raf in our codebase and it works fine in both browsers.

Udo_Schmitz|9 years ago

On Safari I really don't see much of a transition. The content suddenly appears with some flashing. Certainly not seeing anything that looks like an accordion.

bcherny|9 years ago

Note that this also works with position: absolute, if you want to support old browsers.

noahgrant|9 years ago

what are you suggesting positioning absolutely?

whatnotests|9 years ago

iPhone6 freezes for several seconds on the first example.

Seriously wondering what's the point, and why it's on HN??

eridius|9 years ago

This page is completely broken with Ghostery installed and configured to block Sift Science. I think this is partially a Ghostery bug, because it probably shouldn't be blocking Sift Science when I'm on a *.siftscience.com domain, but the page should also probably not break horribly just because I'm blocking trackers.