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

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 19 Oct 2020 23:57:33 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-712504763-1603151852-sysbot+gh@w3.org>
@dbaron That is an excellent point: using division lets us avoid a scale-dependence (so going from `2/1` to `10/1` is the same as going from `20/10` to `100/10`), but it still introduces an orientation dependence; tall and wide versions of the same ratios interpolate differently.

Using the logarithm of the division, then, seems to make a lot of sense - it'll interpolate your examples by going from (wlog, using log2) `1` to `3.32` for the first, and from `-1` to `-3.32` for the second, exactly symmetric.

It also means that going from `1/2` to `2/1` will end up with a square `1/1` ratio in the middle of the transition, which I think is what authors would expect.

So if nobody objects, I'll change to using the logarithm of the division result.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 19 October 2020 23:57:37 UTC

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