[web-animations] distance computation issue

Hi, everyone.

Please, consider the following example:
       var keyframes = [
           {top: '10%'},
           {top: '20%'},
           {top: '50%'}
       ];
       var effect = new KeyframeEffect(keyframes, 'paced(top)');
       effect.getFrames(); // value of computedOffset in returned frames?

To calculate computedOffset spacing keyframes procedure needs to calculate
distance between values of paced property. Distance computation for  
percentage values
is specified here  
http://w3c.github.io/web-animations/#animatable-as-length-percentage-or-calc-section

> distance computation: as with animatable as real number but using the  
> used value [CSS21] for Vstart and Vend.

Used value definition http://www.w3.org/TR/CSS2/cascade.html#used-value

> Computed values are processed as far as possible without formatting the  
> document.Some values, however, can only be determined when the document  
> is being laid out.For example, if the width of an element is set to be a  
> certain percentage of itscontaining block, the width cannot be  
> determined until the width of the containingblock has been determined.  
> The used value is the result of taking the computedvalue and resolving  
> any remaining dependencies into an absolute value.

Since the actual element and its container are not available, the "used  
value" can not be determined here.
So the distance and computed offset also can not be calculated.

Please, also clarify related question: is it legal to use values like  
'inherit' or 'auto' for property values?

Thanks,
Aleksei

Received on Thursday, 11 December 2014 08:19:04 UTC