-
Notifications
You must be signed in to change notification settings - Fork 715
[css-easing] Allow steps()
to accept an easing function as the <step-position>
#11970
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
Comments
Can't you do it with a really long That said, I could imagine a few different animations where this would be useful. If CSS had SMIL's |
Yes, but then you’d need a generator to generate the contents for |
@bramus not sure I understand, are they asking to be able to set the keyframe-wide easing once in the |
Gotcha! Then your proposal sounds fine, however, I wonder if we have any other use-cases beside creating an animated clock? |
Ah, yes, I forgot we specified that. I think that's more useful for this case because it allows you to easily have a flat part followed by an ease part which seems more clock-like to me, e.g. window.target.animate({
rotate: ['0deg', '0deg', '6deg']
}, {
duration: 1000,
iterations: Infinity,
iterationComposite: 'accumulate',
easing: 'ease'
}); I'm not sure how you'd achieve that with the |
Recently Vasilis asked:
They needed this create the seconds hand of this clock which uses an
ease
between every second it ticks: https://vasilis.nl/clocks/station-clock/01/As a workaround I pointed them to creating a bunch of keyframes and setting the
animation-timing-function
per keyframe, which they did, resulting in a lot of code.:(Not sure why they chose
58s
, though)If
steps()
were to accept another easing function as the<step-position>
, the code could be simplified to the following:The text was updated successfully, but these errors were encountered: