Skip to content

[css-animation] Is calc() allowed to be used for the <keyframe-selector> production in the @keyframes prelude? #10879

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

Closed
weinig opened this issue Sep 12, 2024 · 3 comments

Comments

@weinig
Copy link
Contributor

weinig commented Sep 12, 2024

The <keyframe-selector> production in the @keyframes prelude is defined via the grammar:

<keyframe-selector> = from | to | <percentage [0,100]>

Generally, use of <percentage> implies the ability to use calc(), but it does not seem to be universally implemented that way.

Is the intention of the spec that calc() should be allowed here?

@weinig weinig changed the title [css-animation] Is calc() to be used for the <keyframe-selector> production in the @keyframes prelude? [css-animation] Is calc() allowed to be used for the <keyframe-selector> production in the @keyframes prelude? Sep 12, 2024
@fantasai
Copy link
Collaborator

I think it wasn't explicitly thought about, but if there's no reason not to it might as well work.

@tabatkins
Copy link
Member

Yes, it's generally expected that any place a type appears in the grammar, anything which produces that type is allowed (if valid in the context otherwise).

Historically UAs have been very inconsistent in where they allow math functions outside of properties (and even within properties), but it should work, yes.

@weinig
Copy link
Contributor Author

weinig commented Sep 17, 2024

Great, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants