Skip to content

restrict cubic-bezier-timing-function abscissas to be in range [0,1]#416

Merged
chrisdavidmills merged 1 commit intomdn:masterfrom
apasov:patch-1
Apr 13, 2020
Merged

restrict cubic-bezier-timing-function abscissas to be in range [0,1]#416
chrisdavidmills merged 1 commit intomdn:masterfrom
apasov:patch-1

Conversation

@apasov
Copy link
Copy Markdown
Contributor

@apasov apasov commented Apr 9, 2020

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

cubic-bezier(<number>, <number>, <number>, <number>)
Specifies a cubic Bézier easing function. The four numbers specify points P1 and P2 of the curve as (x1, y1, x2, y2). Both x values must be in the range [0, 1] or the definition is invalid.

And from here: 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 <number [0,1]> is the correct syntax for x1 and x2 parameters of cubic-bezier

@apasov apasov changed the title restrict cubic-bezier-timing-function abscissas to be in the range [0… restrict cubic-bezier-timing-function abscissas to be in range [0,1] Apr 9, 2020
@chrisdavidmills
Copy link
Copy Markdown
Contributor

Yup, looks reasonable. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants