Skip to content

fix(animation-frames-timing-function): replace frames() which is not a timing function #150

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

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

madhuroshan
Copy link
Contributor

@madhuroshan madhuroshan commented Sep 15, 2023

Description

In mdn/css-examples/animation-frames-timing-function/index-waa.html

In div.animate(keyframes,options) options object have easing function given as frames(10) but frames(10) is not a valid value of easing functions.

Can't find any easing function named frames in mdn docs . So I replaced
frames with steps (we can add others like cubic-bezier and other easing functions)

changed var easingFunctions = ["frames(10)", "steps(10)", "ease-in"]; to
var easingFunctions = ["steps(5)", "steps(10)", "ease-in"];

Fixes #145

@estelle
Copy link
Member

estelle commented Oct 2, 2023

The index page reads:

The "animation-frames-timing-function" directory contains a simple example that demonstrates the difference between the steps() timing function available for CSS animations and transitions, and the new frames() timing function. Run the example live. You can also find versions that show the same timing function used with transitions, and used with the Web Animations API.

So this text is intentional. We should delete the whole example rather than edit it and the paragraph in https://github.com/mdn/css-examples/blob/main/README.md that mentions it.

Paging @chrisdavidmills, as the original author ... 6 years ago ... just to confirm.

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am impressed that you think I'll remember work that I did 6 years ago ;-)

This is really bizarre — I'm pretty sure I'm not going mad, and that there was at one point a timing function called frames(). But I can't find a mention of it anywhere except on these pages I wrote. It must've been introduced experimentally and then quickly abandoned.

I don't mind having an updated example with two different steps functions, or just deleting the frames() example altogether. Either is OK, IMO.

@caugner caugner changed the title fixing animation-options in css-examples fix(animation-frames-timing-function): replace frames() which is not a timing function Oct 25, 2023
Copy link
Contributor Author

@madhuroshan madhuroshan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes those are the changes required

@caugner
Copy link
Contributor

caugner commented Oct 25, 2023

Yes those are the changes required

We just need to reformat the code, waiting on a reply on this comment to understand how to proceed.

@madhuroshan
Copy link
Contributor Author

okay

@OnkarRuikar
Copy link
Contributor

OnkarRuikar commented Oct 25, 2023

We just need to reformat the code, waiting on a reply on this comment to understand how to proceed.

For now, I suggest you get the formatted code from this Prettier playground link.

Only change from default setting is --bracket-same-line is set to true. And html parser is used.

@madhuroshan
Copy link
Contributor Author

Add the formatted code and commit the changes?

@OnkarRuikar
Copy link
Contributor

Add the formatted code and commit the changes?

yes

Format using Prettier playground link.
@caugner
Copy link
Contributor

caugner commented Oct 25, 2023

Oops, sorry, hadn't see your last two comments!

@madhuroshan
Copy link
Contributor Author

You have added the formatted code right? So, everything is done then?

@caugner
Copy link
Contributor

caugner commented Oct 25, 2023

You have added the formatted code right? So, everything is done then?

Yes, all done. :)

@caugner caugner merged commit 64d018e into mdn:main Oct 25, 2023
@caugner
Copy link
Contributor

caugner commented Oct 25, 2023

Thank you @madhuroshan! 🎉

@madhuroshan
Copy link
Contributor Author

Thank you @caugner @chrisdavidmills

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No output is showing on Web animations API
5 participants