Re: [csswg-drafts] [css-values-4] How to interpolate min/max/clamp? (#4082)

@AmeliaBR So if you want to interpolate function parameters instead of function results, does it meant that the half point between `pow(2, 2) = 4` and `pow(2, 4) = 16` would be `pow(2, 3) = 8` and not `(4+16)/2 = 10`? And the half point between `tan(0turn) = 0` and `tan(0.5turn) = 0` would be `tan(0.25turn) = infinity`? Or would `min/max/clamp` be special in this regard?

IMO this kind of things seem nice for simple cases but can get complicated and very inconsistent. So while I do think it's a valid usecase, maybe it would be better to do it using custom props. I believe this is supposed to work if `--param` is registered as a `<length-percentage>`:
```css
#el {
  transition: --param 1s;
  --param: 0%;
  width: min(5em, var(-param));
}
#el:hover {
  --param: 100%;
}

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

Received on Thursday, 4 July 2019 16:21:27 UTC