Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS class helper? #9

Open
slavafomin opened this issue Mar 1, 2016 · 3 comments
Open

CSS class helper? #9

slavafomin opened this issue Mar 1, 2016 · 3 comments

Comments

@slavafomin
Copy link

Hello!

Thank you for this great module!

However, I have a proposition.

It would be great to have a CSS class helper in order to use it like this:

when-visible-class="animated fadeInUp"

It will add a CSS class when element is visible and remove it when it's hidden. I think this is the most commonly used scenario. It will make end-user's code much cleaner.

@rpocklin
Copy link
Owner

Happy to look at a PR. I didn't want to force any CSS on the consumers of this since it can be quite different depending on how you want to use it. These are also quite generic class names which could be overriding other styles (which I want to avoid). The examples contain typical usages though.

@rpocklin
Copy link
Owner

rpocklin commented Jun 8, 2016

I do like the idea, but feel like as soon as I implement it, i'll get other people asking for a javascript callback instead ;) I'll leave this open, if we get plenty of +1s i'll action it.

@rpocklin
Copy link
Owner

rpocklin commented Jun 27, 2016

More thinking - if this was a separate attribute (ie. optional) I think it would be fine. Let me know if you want to do a PR otherwise I might get to it sooner or later.

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

No branches or pull requests

2 participants