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

[csswg-drafts] [css-variables] When does substitution occur, before or after animation interopolation?

From: Greg Whitworth via GitHub <sysbot+gh@w3.org>
Date: Wed, 17 Aug 2016 00:00:47 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-171545679-1471392045-sysbot+gh@w3.org>
gregwhitworth has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-variables] When does substitution occur, before or after 
animation interopolation? ==
I think the spec could be a little bit more clear on when substitution
 actually occurs for custom properties. We know that they happen 
during computed value time, but this doesn't get into the minutia of 
whether or not this occurs before the animation interpolation or 
after.

If you take the following example, what should happen:
http://jsbin.com/busapezohu/1/edit?html,css,output

Chrome: No background is painted for either div
FF: Second div background is transitioned

Currently the spec states the following:

> Notably, they can even be transitioned or animated, but since the UA
 has no way to interpret their contents, they always use the "flips at
 50%" behavior that is used for any other pair of values that can’t be
 intelligently interpolated. However, any custom property used in a 
@keyframes rule becomes animation-tainted, which affects how it is 
treated when referred to via the var() function in an animation 
property.

This seems to state that they should work, but that it may not be 
possible to correctly interpolate a custom property (as seen in the 
`test` animation since it's merely an ident at that point). So I would
 suggest that what Firefox is doing is the correct outcome, that you 
do substitution first and then any animation interpolation once we 
know the value and the property it is applied to is blue we can 
correctly interpolate to that of blue (as seen in the regular 
testcase).

This may even want to be taken over to the cascade specification where
 we get more specific about when certain things happen during various 
stages, in this case Computed Value time.

cc: @shans as this is what I was pinging you about :)



Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/411 using your GitHub 
account
Received on Wednesday, 17 August 2016 00:00:55 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:22 UTC