w3c / w3c/csswg-drafts

[css-easing-1] No precision requirement or recommended algorithm for cubic Beziers

Open
#4,014 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-easing-1 Needs Design / Proposal
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

https://drafts.csswg.org/css-easing-1/#cubic-bezier-easing-functions

The spec states "The evaluation of this curve is covered in many sources such as [FUND-COMP-GRAPHICS]." No recommended algorithm or required error tolerance is provided. Chrome is presently failing several WPT tests with easing functions due to a performance vs precision trade off in numerically estimating Bezier outputs. It would be nice to lock down the precision requirements and update tolerances on test expectations accordingly.

It would also be nice to have a recommended algorithm for root finding: whether it be the bisection method, a Newton - bisection hybrid, or Cardano's method to name a few. Estimating the error in the output function for a given tolerance in the root estimation is non-trivial. Requiring full precision may be prohibitively expensive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the CSS Easing Level 1 cubic-bezier easing-functions section and inspect the WPT easing-function tests mentioned in the issue. Determine an implementable precision/error tolerance and root-finding recommendation, then update the specification and align the affected test expectations.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation, testing-qa
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.