Incorrect syntax highlighting for keyframes at-rule when using vendor prefixes
Closed this issue · 1 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
The syntax highlighting for the keyframes at-rule is not applied correctly if there are vendor prefixes. e.g. @keyframes
produces the correct syntax highlighting, but @-moz-keyframes
, @-o-keyframes
, @-webkit-keyframes
and @-ms-keyframes
do not.
Steps to Reproduce
Two ways to reproduce.
First way:
- Create a new file with a .css extension
- Paste the following text into this file:
@keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Syntax highlighting incorrect for vendor prefixes
/* Firefox < 16 */
@-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
@-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
@-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
- Open the file in Atom
Second way:
- Open a blank file (File > New File)
- Paste the above text into this blank file
- Switch the syntax to CSS
Expected behavior:
The following behavior for -webkit-keyframes, -o-keyframes, -moz-keyframes, and -ms-keyframes
Actual behavior:
Reproduces how often: 100%
Versions
Atom : 1.15.0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
OS : MacOS Sierra 10.12.3
Additional Information
Tested with Seti and Atom Light syntax themes. Seems reproducible on multiple syntax themes.
P.S. I haven't contributed to open source before - this is my first time. If this is accepted as a bug, I have a fix to this that I'd love to put a PR in for.