diff --git a/lib/clean.js b/lib/clean.js
index <HASH>..<HASH> 100644
--- a/lib/clean.js
+++ b/lib/clean.js
@@ -273,9 +273,13 @@ var CleanCSS = {
       }
     });
 
-    // empty elements
-    if (options.removeEmpty)
-      replace(/[^\}]+?\{\}/g, '');
+    if (options.removeEmpty) {
+      // empty elements
+      replace(/[^\{\}]+\{\}/g, '');
+
+      // empty @media declarations
+      replace(/@media [^\{]+\{\}/g, '');
+    }
 
     // remove universal selector when not needed (*#id, *.class etc)
     replace(/\*([\.#:\[])/g, '$1');
diff --git a/test/unit-test.js b/test/unit-test.js
index <HASH>..<HASH> 100644
--- a/test/unit-test.js
+++ b/test/unit-test.js
@@ -644,6 +644,14 @@ vows.describe('clean-units').addBatch({
     'just a semicolon': [
       'div { ; }',
       ''
+    ],
+    'inside @media': [
+      "@media screen { .test {} } .test1 { color: green; }",
+      ".test1{color:green}"
+    ],
+    'inside not empty @media': [
+      "@media screen { .test {} .some { display:none } }",
+      "@media screen{.some{display:none}}"
     ]
   }, { removeEmpty: true }),
   'skip empty elements': cssContext({
Fixes #<I> - removing empty selectors from media query.