Skip to content

Commit

Permalink
Fix for yui#80 that also works with vendor specific keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Wozeniak (Bigwebmaster) committed Aug 16, 2013
1 parent f71090d commit 28513cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/com/yahoo/platform/yui/compressor/CssCompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public void compress(Writer out, int linebreakpos)

// Replace 0(px,em,%) with 0.
css = css.replaceAll("(?i)(^|[^0-9])(?:0?\\.)?0(?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|m?s|k?hz)", "$10");
css = css.replaceAll("(@(?:-.+?)?keyframe.*?)0\\{", "$10%{");

// Replace 0 0 0 0; with 0.
css = css.replaceAll(":0 0 0 0(;|})", ":0$1");
Expand Down

0 comments on commit 28513cd

Please sign in to comment.