Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

button states with animation instead of class #116

Open
softlion opened this issue Nov 28, 2010 · 2 comments
Open

button states with animation instead of class #116

softlion opened this issue Nov 28, 2010 · 2 comments

Comments

@softlion
Copy link

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.

@shehi
Copy link
Member

shehi commented Aug 26, 2016

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?

@fidian
Copy link
Collaborator

fidian commented Aug 26, 2016

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants