Skip to content

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

Closed

Description

@weinig

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?

Activity

  1. 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?[/+] on Sep 12, 2024
  2. fantasai commented on Sep 16, 2024

    @fantasai
    Collaborator

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

  3. tabatkins commented on Sep 16, 2024

    @tabatkins
    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.

  4. weinig commented on Sep 17, 2024

    @weinig
    ContributorAuthor

    Great, thanks.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions