angular-scroll-animate icon indicating copy to clipboard operation
angular-scroll-animate copied to clipboard

CSS class helper?

Open slavafomin opened this issue 8 years ago • 3 comments

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.

slavafomin avatar Mar 01 '16 19:03 slavafomin

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 avatar Mar 28 '16 21:03 rpocklin

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 avatar Jun 08 '16 12:06 rpocklin

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.

rpocklin avatar Jun 27 '16 22:06 rpocklin