Re: [csswg-drafts] [css-values] [css-fonts-4] Native interpolation function in CSS

Coming super late to this discussion I know but I _really_ like Tab's variation on the original proposal. I think you can do pretty much anything you need with it, correct?

```
interpolate(18px, 24px, calc((100vw - 400px) / 400px), ease-in-out);
interpolate(red, blue, var(--slider-position));
```

The form would be `interpolate(from, to, fraction, easing)` and `fraction` would be automatically clamped between 0 and 1. You'd need unit algebra to use `calc` in the first example but I'd be suggesting using `style.setProperty('--slider-position', mouseX / elWidth)` or something in JS for the second.

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

Received on Wednesday, 24 May 2017 23:43:22 UTC