Skip to content

[web-animations-1] Allow keyframe offsets outside the range [0,1]? #2081

Closed

Description

@birtles

Activity

  1. Nadya678 commented on Dec 7, 2017

    @Nadya678

    cubic-bezier(0, -0.5, 1, 1.5)?
    Current in use for colours by me. It works in all modern browsers in the same way.

  2. birtles commented on Dec 11, 2017

    @birtles
    ContributorAuthor

    This is about being able to specify keyframes at, e.g. -10% so that when you have a timing function of cubic-bezier(0, -0.5, 1, 1.5) you can control the interpolation (or actually extrapolation) outside the 0%~100% range.

  3. Nadya678 commented on Dec 17, 2017

    @Nadya678

    it is natural: only 0% to 100% (from is 0% and to is 100%). Before "from" and after "to"? It will be unintuitive. the -10% and 110% shall be parsed as errors.

  4. BorisChiou commented on May 15, 2026

    @BorisChiou
    Contributor

    So now for scroll-driven animation, it is possible to have a resolved computed offset outside [0, 1], e.g. cover -20% could be resolved to -0.2 for computedOffset. So this should be reasonable now to allow the percentage offset be outside [0, 1].

  5. BorisChiou commented on May 15, 2026

    @BorisChiou
    Contributor

    Oh I found this: #7825. So it seems we would like to keep the percentage offset within [0, 1]. Only do some special handle for timeline range name at 0% and 100%.

  6. birtles commented on Aug 12, 2026

    @birtles
    ContributorAuthor

    I don't think we're going to change this in level 1 anyway. It's consistently implemented across browsers. If we decide to allow offsets outside the range [0,1] in general, we'll need to investigate potential Web compat issues before proceeding.

    #8202 currently monkey patches the implicit keyframe generation part which isn't great (and might be what tripped up @BorisChiou above) so I think we add a note to the implicit keyframe generation part to call that out.

  7. birtles commented on Aug 12, 2026

    @birtles
    ContributorAuthor

    I've filed #14309 for the monkey-patch issue and referenced it in #14310, dropping the reference to this issue at the same time.

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