-
Notifications
You must be signed in to change notification settings - Fork 14
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
Possible to hide the carat after animation complete? #16
Comments
Hey Luke, no worries at all! Opening an issue like this is actually the perfect way to make a future recommendation. In fact, I believe there's already another issue open for hiding the carrot after the animation completes, so I should be getting to that one soon. Could you please elaborate on your idea for overwriting the prefix? I'd like to give some more thought to how I handle that so it's the most flexible moving forward. Any ideas on what you think the ideal syntax would be? Thanks! |
Ah sweet! Look forward to hiding the carat! :) I'm super new to CSS preprocessing, so not sure how much help I'll be. If it was JS I'd be looking for a callback option so that basically at the end of my animation, I can do something else. I realise there are no callbacks in CSS - I did find some info on I wonder whether a simpler option might be for the user to run another instance of typed once one is finished? Perhaps there could be an option to hide the entire element at the end of the animation and then it could be up to the user to initiate another instance on another HTML element and apply the correct delay at the start?... So I could do something like:
The only issue I can foresee with this is that I believe the second typed instance will have a blinking carat during the beginning 10 second delay period? |
@greyskin So there are several pieces here
Was there anything else? 🙂 |
Yeah in the use case I'm imagining - basically it would be nice to be able to run multiple instances of typed on different elements one after the other. (That way you can have one instance that uses a prefix, one that doesn't, etc. And it means you don't have to try to account for every possible way that people might want to use typed.) But yeah, if I had an instance of typed with a delay at the start (and another instance running in the meantime), I wouldn't want the carat of the second instance sitting there blinking. Does that help?
I was actually meaning
Yes, that was what I was originally suggesting, but I'm hazarding a guess it would be simpler from a development perspective to simply allow the user to hide the entire element once the animation is complete, and then if they want t run another animation on another element, they can. What do you think? |
Hi Brandon,
Apologies for raising an "issue" for what is essentially a question - I scoured the docs and it doesn't look like it's possible to hide the carat after the animation is complete (where the
iterations
parameter has been set).Additionally I've been trying to find a way to overwrite the prefix text so I can do something like:
Is this stuff possible? Feel free to respond and then delete this issue since it isn't one. Sorry, I don't use GitHub much and was unsure how else to reach out to you.
The text was updated successfully, but these errors were encountered: