Skip to content
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

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

Closed
apasov opened this issue Apr 16, 2020 · 0 comments
Closed

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

apasov opened this issue Apr 16, 2020 · 0 comments

Comments

@apasov
Copy link

apasov commented Apr 16, 2020

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

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

2 participants