W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2016

[csswg-drafts] frames() as a more intuitive steps()

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Thu, 26 May 2016 00:17:29 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-156878007-1464221848-sysbot+gh@w3.org>
tabatkins has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== frames() as a more intuitive steps() ==
As was discussed in the past, and most recently championed by Rachel 
Nabors, steps() is defined in a nonintuitive way.  Depending on 
whether you use "start" or "end", you never actually see the 
starting/ending value.  If you *do* want to see both the starting and 
ending values, and have a stepped transition between them, you need to
 do some math and *overshoot* the desired end-point instead.  This is 
extremely common; for example, the default "discrete" method that we 
use for things without a better interpolation method is exactly this! 
This also shows the weakness of the hack - for non-interpolable 
values, you can't "overshoot" either.

It was suggested that we add a new function that handles things more 
intuitively, so that saying you want "2 steps" creates a timing 
function that spends half the time on the starting value and half on 
the ending value, "3 steps" spend a third of time at the start, a 
third in the middle, and a third at the end, etc.

The name `frames()` was suggested for this and proved popular in 
Rachel's group of authors, by analogy with animation frames.  It takes
 a single `<integer>` which must be >= 2.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/136 using your GitHub 
account
Received on Thursday, 26 May 2016 00:17:32 UTC

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