Remove space between comma-delimited expressions in compact output
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6dda348..c43fc58 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+* Removed whitespace between comma-delimited expressions in compact output.
+
+  Before:
+  ```css
+  div{color:rgba(0, 0, 0, 0.5);}
+  ```
+
+  After:
+  ```css
+  div{color:rgba(0,0,0,0.5);}
+  ```
+
 ## 0.14.5
 
 * Fixed a crashed caused by parsing `:host()` without an argument and added an
diff --git a/lib/src/css_printer.dart b/lib/src/css_printer.dart
index c2f0af0..b88516f 100644
--- a/lib/src/css_printer.dart
+++ b/lib/src/css_printer.dart
@@ -548,7 +548,16 @@
       var expression = expressions[i];
       if (i > 0 &&
           !(expression is OperatorComma || expression is OperatorSlash)) {
-        emit(' ');
+        // If the previous expression is an operator, use `_sp` so the space is
+        // collapsed when emitted in compact mode. If the previous expression
+        // isn't an operator, the space is significant to delimit the two
+        // expressions and can't be collapsed.
+        var previous = expressions[i - 1];
+        if (previous is OperatorComma || previous is OperatorSlash) {
+          emit(_sp);
+        } else {
+          emit(' ');
+        }
       }
       expression.visit(this);
     }
diff --git a/test/declaration_test.dart b/test/declaration_test.dart
index 220e816..75895f7 100644
--- a/test/declaration_test.dart
+++ b/test/declaration_test.dart
@@ -874,6 +874,9 @@
     transform: scaleX(0);
   }
 }
+div {
+  color: rgba(0, 0, 0, 0.2);
+}
 ''';
   final String generated =
       'div{color:green!important;background:red blue green;}'
@@ -882,7 +885,8 @@
       '@page:first{}'
       '@page foo:first{}'
       '@media screen AND (max-width:800px){div{font-size:24px;}}'
-      '@keyframes foo{0%{transform:scaleX(0);}}';
+      '@keyframes foo{0%{transform:scaleX(0);}}'
+      'div{color:rgba(0,0,0,0.2);}';
 
   var stylesheet = parseCss(input, errors: errors);