Permalink
Browse files

We need to support negative numbers in calc. e.g: calc(-60% + 70px)

  • Loading branch information...
bluecyclone committed Jan 4, 2017
1 parent d97ab32 commit f141b3412ab93407d858ddc5aa046bba85ef46fc
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 f141b34

Please sign in to comment.