Fix the issue with parsing @keyframes.

Also add a test case and update some test files to capture the issue with @keyframes parsing.

This fixes #7494 and #8463.
Nice suggestion! But I don't have the `char` param in my function since we don't need to support other brackets yet.