Simplified code for checking whether a rule is an @keyframes or a
@keyframe rule