W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2021

Re: [csswg-drafts] [css-images] Add easing functions to color stops (#1332)

From: Dan Burzo via GitHub <sysbot+gh@w3.org>
Date: Sun, 08 Aug 2021 14:16:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-894804475-1628432183-sysbot+gh@w3.org>
Something I've recently run into: what should happen when the easing function produces values outside the `[0, 1]` range?   Here's an example:

```css
linear-gradient(red, green, cubic-bezier(.25,-0.25,.75,1.25), blue);
```

When we reach the green-blue segment, the [`cubic-bezier(.25,-0.25,.75,1.25)`](https://cubic-bezier.com/#.25,-0.25,.75,1.25) easing has regions of overshoot at both ends of the segment. What color are those regions?

A. __Always extrapolate__ easing values outside `[0, 1]` solely based on the two participating colors in the current segment?
B. __Prefer__ reaching to adjacent segments, e.g. `interpolate(green, blue, -0.5)` picks up the red from the previous segment, and only extrapolate if that's not possible?

An alternative to extrapolation is clamping to the color values at the edges of the segment to avoid weird overshoots. 

-- 
GitHub Notification of comment by danburzo
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1332#issuecomment-894804475 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 8 August 2021 14:16:26 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:42 UTC