Uniform icon indicating copy to clipboard operation
Uniform copied to clipboard

button states with animation instead of class

Open softlion opened this issue 13 years ago • 2 comments

I would like to animate a skinned button state change (fade in push skin fade out normal skin). For this uniform needs one or more callback delegates / custom events on button state change.

softlion avatar Nov 28 '10 11:11 softlion

Can't this be done with CSS-3? I realize you might require older browser compatibility, but Uniform already has performance problems when it comes to few dozen form elements: I am not sure how it will benefit us if we add animation related handlers as well.

@fidian , thoughts?

shehi avatar Aug 26 '16 10:08 shehi

I think there could be advantages to having a callback that's called when classes change. It opens up a whole world of possibilities for developers. The code wouldn't have to be that massive - simply check if a callback is registered for the elements and then call it with something like "apply", "hover-start", "focus", "hover-end", "blur", "removed", etc. I don't remember exactly what we use for events, but I think it would be easiest to mimic that. Allow the developer to take whatever action they want on state changes.

I also think that the fading transition that is being described by @softlion could be done more easily with CSS3 for this request. Perhaps callbacks would be more appropriate for the next release?

fidian avatar Aug 26 '16 11:08 fidian