w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.47k stars 658 forks source link

[css-animations] Custom properties should appear in getKeyframes #5126

Open andruud opened 4 years ago

andruud commented 4 years ago

We currently have a WPT that verify that custom properties do not appear in getKeyframes' result. (KeyframeEffect-getKeyframes.tentative.html).

At a quick glance, this does not appear to have any basis in css-animations or web-animations. I can also not think of any good reason to exclude them. We should clarify that custom properties are not somehow removed from the computed keyframe, and change the WPT.

birtles commented 4 years ago

As best I can recall, that test comes about because keyframes from CSS animations (unlike Web Animations) contain only computed properties and hence all var() references are resolved.

At the time (and now too, unfortunately), Firefox didn't support registered custom properties (Mozilla bug) so there was no need to keep custom properties around. With registered custom properties, it definitely makes sense to keep them around.

andruud commented 4 years ago

Is there a resolution on this that needs to be "overturned", or can we just make this change?

birtles commented 4 years ago

If all the vendors agree, we can just make this change.

andruud commented 4 years ago

@smfr What do you think? Can we include custom properties in the result of getKeyframes? :-)