@-webkit-keyframes rule not being minified to one line
See original GitHub issueAn example CSS rule of:
@-webkit-keyframes bugfix {
from { padding: 0 }
to { padding: 0 }
}
Is processed via clean-css as:
@-webkit-keyframes bugfix{from{padding:0}
to{padding:0}
}
Ideally the whole rule should be all on the same line, I suspect its because of this being an at-rule
and perhaps clean-css is seeing it as separate CSS properies, the syntax is weird. I use keepBreaks: true
, which I think is where the problem is, but all other normal CSS rules are minified to a single line without any issue.
Equally, applying the rule above as a single line and then processing it with clean-css, causes it to be broken onto a new line, as noted in the example.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
webkit keyframes breaks when minimized - Stack Overflow
Facing a weird issue; trying to create a spinner. when my css gets minified the format changes for the webkit ...
Read more >0% steps in @keyframe animations incorrectly changed to 0 #80
The previously workaround do work, but they are working. Using CSS animations librairies is a nightmare, because you have to rewrite every-rules ......
Read more >Animation - CSS-Tricks
Each animation needs to be defined with the @keyframes at-rule which is then called with the animation property, like so:
Read more >keyframes - CSS: Cascading Style Sheets - MDN Web Docs
There is cascading within a @keyframes rule if multiple keyframes specify the same percentage values.
Read more >How to Avoid CSS3 Animation Minification Muddles - SitePoint
Your production CSS should always be minified, right? However, beware of optimization behavior that could affect your lovely animations.
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 FreeTop 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
Top GitHub Comments
@jakubpawlowicz This is really great work! I’ll definitely be implementing this into my email boilerplate project. I’ll do some experimenting, thanks for the new config options!
thanks @jamesmacwhite, 4.0 should be out soon!