Fix `@keyframes`

This fixes #390.

@connors: don't merge this, just review and I'll merge myself after rebasing.