Skip to content

[css-easing] Restrict cubic-bezier abscissas to the range [0,1]  #4960

@apasov

Description

@apasov

https://drafts.csswg.org/css-easing-1/#cubic-bzier-easing-function

A cubic Bézier easing function is a type of easing function defined by four real numbers that specify the two control points, P1 and P2, of a cubic Bézier curve whose end points P0 and P3 are fixed at (0, 0) and (1, 1) respectively. The x coordinates of P1 and P2 are restricted to the range [0, 1].

https://drafts.csswg.org/css-values-3/#numeric-ranges

Range restrictions can be annotated in the numeric type notation using CSS bracketed range notation—[min,max]—within the angle brackets, after the identifying keyword, indicating a closed range between (and including) min and max. For example, <integer [0,10]> indicates an integer between 0 and 10, inclusive.

So I think the valid syntax for cubic-bezier should be
cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)

It should be changed in these two locations:

https://drafts.csswg.org/css-easing-1/#typedef-cubic-bezier-easing-function
https://drafts.csswg.org/css-easing-1/#funcdef-cubic-bezier-easing-function-cubic-bezier

By the way, mdn/data has already changed the syntax:
mdn/data#416

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