highlightjs / highlightjs/highlight.js
(CSS) Animations highlighting incorrectly
- Dominant language
- JavaScript
- Stars
- 25k
- Forks
- 3.8k
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 3
Description
**CSS animations highlighting incorrectly**
When writing CSS animations, such as:
```CSS
@keyframes animation {
10.1% {
left: 10px;
}
}
```
It highlights incorrectly.
- `animation` isn't highlighted as a variable
- `10.1%` isn't highlighted as an `hljs-number` as it should be
- `.1` is highlighted as a `hljs-selector-class`.
**Language: CSS**
**I used `highlight`**
...
**Sample Code to Reproduce**
```CSS
@keyframes animation {
10.1% {
left: 10px;
}
}
```
Or any other CSS animation, really.
Example JSFiddle: https://jsfiddle.net/barhatsor/oz14ewyx/2/
**Expected behavior**
Turns out Github also higlights it incorrectly so here's a picture of CodeMirror getting it right:

Would be happy if this got fixed. Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.