Fix #110: Recognize keyframes at-rule with vendor prefixes#111
Fix #110: Recognize keyframes at-rule with vendor prefixes#111winstliu merged 1 commit intoatom:masterfrom clchen28:keyframes-vendor-prefix
Conversation
|
Your change can be simplified to |
|
Ok - amended previous commit with simplified regex |
|
Nope, no need for additional scopes. I'd make the groups non-capturing, though, to save a little extra overhead. |
|
Ok @Alhadis - I've amended the commit and updated the groups to be non-capturing, e.g. and
|
|
@50Wliu LGTM. |
grammars/css.cson
Outdated
| { | ||
| # @keyframes | ||
| 'begin': '(?i)(?=@keyframes([\\s\'"{;]|/\\*|$))' | ||
| 'begin': '(?i)(?=@(?:(?:-(?:webkit|moz|o|ms)-)?keyframes)([\\s\'"{;]|/\\*|$))' |
There was a problem hiding this comment.
The outside capture can be removed, so this can be simplified to be (?:-(?:webkit|moz|o|ms)-)?keyframes. Same for below.
(?i)(?=@(?:-(?:webkit|moz|o|ms)-)?keyframes([\\s\'"{;]|/\\*|$))
|
Ok - @50Wliu per your review, I've amended the commit to remove the outer capture for the regex, e.g. |
|
Thanks! |
|
:D My first ever PR for FOSS! Thanks for the review. |
Description of the Change
Added -webkit-keyframes, -moz-keyframes, -o-keyframes, and -ms-keyframes to begin and patterns regex for
@keyframesin grammar.cson, allowing these to follow the same syntax highlighting rules as@keyframes.Fix #110
Benefits
Applies
@keyframesat-rule syntax highlighting correctly if vendor prefixes are usedApplicable Issues
#99 Add support for literally every modern CSS feature