Skip to content

[css-easing] Resolving curves not available at parse time #11211

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

Open
sesse opened this issue Nov 14, 2024 · 2 comments
Open

[css-easing] Resolving curves not available at parse time #11211

sesse opened this issue Nov 14, 2024 · 2 comments
Labels

Comments

@sesse
Copy link
Contributor

sesse commented Nov 14, 2024

https://drafts.csswg.org/css-easing/#funcdef-linear specifies:

“If an argument lacks a <percentage>, its input progress value is initially empty, but that is immediately corrected by linear() canonicalization after parsing.”

However, it is not always possible to canonicalize at parse time. For instance, if any of the stops' x values is calc(0.5 + 0.2 * sign(1em - 1px)), we may need to wait until the style is computed before we know if it needs to be clamped to the previous point or not. How do we handle this? What if some of the stops may be resolvable but not all of them?

@Loirooriol Loirooriol added the css-easing-2 Current Work label Nov 14, 2024
@lilles lilles added the Agenda+ label Dec 2, 2024
@sesse
Copy link
Contributor Author

sesse commented Dec 2, 2024

@tabatkins

@astearns astearns moved this to FTF agenda items in CSSWG January 2025 meeting Jan 22, 2025
@astearns astearns moved this from FTF agenda items to Regular agenda items in CSSWG January 2025 meeting Jan 22, 2025
@astearns astearns moved this to Regular agenda in CSSWG April 2025 meeting agenda Mar 27, 2025
@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-easing] Resolving curves not available at parse time, and agreed to the following:

  • RESOLVED: Copy linear gradients timing details into the linear function
The full IRC log of that discussion <JoshT> TabAtkins: Spec text for linear easing function has canonical ???
<JoshT> ... steps for filling in steps that have empty inputs like gradients
<astearns> s/canonical/canonicalization/
<dholbert> s/canonical ???/canonicalization/ (I think)
<JoshT> ... but it lacks the timing details that linear gradients put in for values that can't be resolved until computed value time
<JoshT> ... spec bug? I recommend we copy details from linear gradients because it's close to a colour stop list
<JoshT> weinig: can we abstract it into something more general?
<JoshT> TabAtkins: my policy is to wait for a third thing? but I'll see if it makes sense
<TabAtkins> WET code - write everything thrice
<JoshT> weinig: when I implemented this in WebKit, did at computed value time, but i don't expect this to be a compat issue
<JoshT> TabAtkins: proposed resolution is to copy linear gradients into the ??? function
<JoshT> RESOLVED: Copy linear gradients timing details into the linear function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Regular agenda
Status: Regular agenda items
Development

No branches or pull requests

5 participants