Permalink
Browse files

Merge pull request #266 from raxcido/master

We need to support negative numbers in calc. e.g: calc(-60% + 70px)
  • Loading branch information...
2 parents 5e2e8d8 + f141b34 commit 958491db9bff77fe97d3ea0b8af38953aa1f6216 @tml tml committed Aug 18, 2017
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/com/yahoo/platform/yui/compressor/CssCompressor.java
@@ -511,10 +511,10 @@ public void compress(Writer out, int linebreakpos)
while (m.find()) {
String s = m.group();
- s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\+", " + ");
- s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\-", " - ");
- s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\*", " * ");
- s = s.replaceAll("(?<=[%|px|em|rem|vw|\\d]+)\\/", " / ");
+ s = s.replaceAll("(?<=[-|%|px|em|rem|vw|\\d]+)\\+", " + ");
+ s = s.replaceAll("(?<=[-|%|px|em|rem|vw|\\d]+)\\-", " - ");
+ s = s.replaceAll("(?<=[-|%|px|em|rem|vw|\\d]+)\\*", " * ");
+ s = s.replaceAll("(?<=[-|%|px|em|rem|vw|\\d]+)\\/", " / ");
m.appendReplacement(sb, s);
}

0 comments on commit 958491d

Please sign in to comment.