(CSS) Animations highlighting incorrectly
See original GitHub issueCSS animations highlighting incorrectly When writing CSS animations, such as:
@keyframes animation {
10.1% {
left: 10px;
}
}
It highlights incorrectly.
animation
isn’t highlighted as a variable10.1%
isn’t highlighted as anhljs-number
as it should be.1
is highlighted as ahljs-selector-class
.
Language: CSS
I used highlight
…
Sample Code to Reproduce
@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!
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (18 by maintainers)
Top Results From Across the Web
How to auto-animate text highlight in css? - Stack Overflow
You will need to use a pseudo element (preferably :after) and play around with the width of that pseudo element.
Read more >Using CSS transitions - CSS: Cascading Style Sheets | MDN
CSS transitions provide a way to control animation speed when changing ... A common use of CSS is to highlight items in a...
Read more >25 cool CSS animation effects and how to create them
CSS animations can delight, entertain and help users of a site or app. Here's how to create 25 examples with code provided.
Read more >CSS Hover Highlight Effect Code Along - YouTube
A quick code along to learn how to replicate the CSS highlight on hover effect. Subscribe for more and get the code here ......
Read more >An Interactive Guide to CSS Transitions - Josh W Comeau
This problem can be solved in a rather elegant way without needing to reach for JS. We can use transition-delay ! css.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI
css_consistency
is rebased and merged into master now.We’ll see if @allejo has any thoughts. I been working on the CSS consistency more and this is pretty simple once you flatten the grammar… you can just use from/to keywords at the top-level for the frame positives, easy peasy. So complexity shouldn’t stop us.