You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently the backout exits use hardcoded pixel translations. This has 2 drawbacks:
It won't work for very large resolutions
It creates a time gap between the animationend event and the UX of when the animation ends for smaller elements.
Consider I have an element of fixed width 500px, inside it I slide an element to the left, it will be translated to -2000px. The first 20% of the animation time is spent on scaling, after that the remaining 80% is spent on moving the item. This means that after 0.2 seconds of movement the item is no longer visible (overflow hidden).
Suppose when the animation ends I want to start another animation, like something sliding in from the right, this will start very late because half of both animations are not visible
Describe the solution you'd like A clear and concise description of what you want to happen.
Configure the pixel values using variables so that they can be overridden.
Default to using viewport relative units so that it'll work on large resolutions. (this is optional and not strictly related, just something I noticed when reviewing the source code)
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Current alternative is to use setInterval to trigger the next animation early and remove the previous element mid animation.
Additional context Add any other context or screenshots about the feature request here.
I'm happy to make a PR.
The text was updated successfully, but these errors were encountered:
SamMousa
changed the title
Make backout exits use a variable
Make backout exits and entrances use a variable
Apr 16, 2021
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently the backout exits use hardcoded pixel translations. This has 2 drawbacks:
animationend
event and the UX of when the animation ends for smaller elements.Consider I have an element of fixed width
500px
, inside it I slide an element to the left, it will be translated to-2000px
. The first 20% of the animation time is spent on scaling, after that the remaining 80% is spent on moving the item. This means that after 0.2 seconds of movement the item is no longer visible (overflow hidden).Suppose when the animation ends I want to start another animation, like something sliding in from the right, this will start very late because half of both animations are not visible
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Current alternative is to use
setInterval
to trigger the next animation early and remove the previous element mid animation.Additional context Add any other context or screenshots about the feature request here.
I'm happy to make a PR.
The text was updated successfully, but these errors were encountered: