Remix.run Logo
xg15 6 days ago

Fully agreeing with this. I was also surprised that the appearance change of a button on mousedown is considered an animation here. ("Another purposeful animation is this subtle scale down effect when pressing a button.")

Isn't this just very basic optical feedback to indicate that a component is clickable at all and that the click was registered?

dfxm12 6 days ago | parent | next [-]

It fits both the dictionary and colloquial definitions of animation. If there is any domain specific jargon, surely that applies too. I can't understand why this wouldn't be considered an animation...

addaon 6 days ago | parent [-]

I can see either side of it, but in my mind animation (in this context) means the generation and timed display of synthetic tween states to smooth the transition between the display of actual states. The mouse-down case is (in this context) an immediate change from the up- to down- states, without additional frames in between, so is not an animation by this particular domain-specific definition.

trogdc 6 days ago | parent | next [-]

The example on the site does have tween frames: `transition-duration: .15s`

QRY 6 days ago | parent | prev [-]

That makes sense. I think of it like visual movement, a difference in position over time. Even a single step represents a change in position, even if the time increment is very small. The transition is the animation, the duration would be 2 frames: up, and down.

In a nutshell: put two different frames in sequence, and you have an animation.

layer8 6 days ago | parent [-]

But the up and down really consists of two user actions, pressing the mouse button, and releasing it again. See drag-and-drop for example, where that distinction is important. It’s even important for simple buttons: You can generally abort a button press by moving the mouse pointer outside the button area before releasing the mouse button again. In that case, the button action isn’t triggered. The pressed-down state visualizes that the action will be triggered when you release the mouse button while still in the button area.

Animation is when more than one consecutive step happens on it’s own. I’d argue that even tooltips appearing and disappearing after a timeout doesn’t constitute an animation, because the disappearance isn’t immediately consecutive with the appearance, and (maybe more importantly) the intervening state of the tooltip being shown is meaningful to the user as a distinct state.

madeofpalk 6 days ago | parent | prev [-]

Why would it not be an animation?

It’s a pretty basic animation.

6 days ago | parent [-]
[deleted]