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

Re: [csswg-drafts] [css-easing-1] Some ideas for linear() easing (#6533)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 20 Aug 2021 20:47:58 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-902948711-1629492477-sysbot+gh@w3.org>
Syntax nit: I'd probably use a % for the progress value. That accords better with things like gradients, and makes it *much* clearer which value is progress and which is the value:

`linear(0 0%, 0.1 20%, 0.3 40%, 0.7 60%, 0.8 80%, 1 100%)`

It also means we wouldn't necessarily have to impose an ordering, since the types are distinguishable.


I *really* don't like the different behavior between `linear()` and `linear(0,1)`. If we just always made <0 and >1 extend using the first/last segment, you could achieve the clamping behavior with `linear(0 calc(infinity * -1%), 0 0%, 1 100%, 1 calc(infinity * 1%))`. We could probably add some syntax to make that easy and explicit instead, like `linear(0 0% fill, 1 100% fill)`, where the `fill` keyword is only valid on the first/last value, and has the same approximate meaning as `animation-fill-mode`.


Otherwise, big 👍 on the proposal overall. I don't think the spec needs to be *quite* as algorithmic as written here, but the behavior is fine.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 20 August 2021 20:48:00 UTC

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