From @dvoytenko on May 25, 2017 17:24
A proposal is to extend API to accept keyframes name from a CSS style. E.g.
<script>
element.animate('anim1', {duration: 1000});
</script>
...
<style>
@keyframes anim1 {
from {
transform: translateX(200px);
}
to {
transform: translateX(0px);
}
}
</style>
This would be useful because CSS syntax still provides a better way to configure keyframes than a JSON object.
Copied from original issue: w3c/web-animations#189