W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

Re: [csswg-drafts] [css-values-4] How to interpolate <ratio>? (#4953)

From: L. David Baron via GitHub <sysbot+gh@w3.org>
Date: Tue, 20 Oct 2020 20:30:14 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-713121201-1603225813-sysbot+gh@w3.org>
One other possibility that I think might work better that logarithms and still have the desirable properties of avoiding scale-dependence and orientation-dependence is to instead use the function

I(r) = r - 1, for r ≥ 1
I(r) = 1 - (1/r), for r < 1

since I think at least for `aspect-ratio` it might produce smoother size animations, at least when it's the larger size in the ratio that's moving and the smaller size that's fixed.

Note that this is easily invertible:
I'(t) = t + 1, for t ≥ 0
I'(t) = 1/(1-t), for t < 0

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 20 October 2020 20:30:15 UTC

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