-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use visibility to hide element from pointer events #57
Conversation
Thanks, will take a proper look. |
@peduarte no problem. After closer inspection I thought it might not work as I've only applied the hidden state in the keyframe animations, but it appears to work fine ¯_(ツ)_/¯ |
That's what I was thinking. It's a matter of getting the right z-index. You should have the same problem if you use the scale animation, I guess? |
@peduarte possibly, I haven't tried that animation type yet. I can understand your use case. The problem with it is that it's too good! Users, like myself, are using it for more than just images and you didn't expect it to be used in such a complex way. I think the z-index ordering is fine how you have it, it just need to hide the element from pointer events which visibility should cover. I'm using the fix and it's working ok. |
That's a good point. |
@peduarte that seems fair, however the linked article actually shows you can animate visibility. You just need the opacity to make is smooth. |
after some research...
interesting! |
@peduarte pretty cool ay! But shhh, the spec might hear you and change its mind 😉. |
Use visibility to hide element from pointer events
Merged, thanks man! |
No no, thank you! Also, thank you for making this Pen http://codepen.io/peduarte/pen/bVbZLK?editors=001 💜 |
👍 |
Re: https://css-tricks.com/snippets/css/toggle-visibility-when-hiding-elements/
Basically I used Wallop, it was awesome, but I couldn't select the content of the currently viewed item. I used
visibility: hidden
to hide the element. This means the user can interact with the currently viewed item but still allow the item to transition to the next item.Fixes #56 and #54.