Whitelisted properties for keyframes not enforced in CSS animation
What's the issue?
Properties like "width", "height", "left" etc are not whitelisted in amp-animation JSON config, but they can be used in CSS animation, i.e. animating using the CSS "animation" property.
This generates confusion as both the docs of amp-animation and Supported CSS say only opacity and transform are animatable.
How do we reproduce the issue?
http://jsbin.com/wovodariji/edit?html,output
Note that in the example above, div a can be animated using CSS animation property, while for div b amp-animation throws an error saying "width" is not whitelisted for animation.
What browsers are affected?
All browsers
Which AMP version is affected?
1809142227020
@jyn15 In AMP4Ads we also enforce this in CSS, just not for main AMP documents. I don't believe there is a good reason for not enforcing these rules in CSS for documents other than we initially didn't and now it is too late without breaking many pages.
We are not planning to add non GPU friendly properties to amp-animation however.
I checked in AMP4Ads, the validator did report the unsupported properties. We are actually using animations in ads, so CSS animation and amp-animation are consistent in our use case. Thank you for the reply!