diff --git a/lib/inliner.php b/lib/inliner.php index 52cc485..dc32d7c 100644 --- a/lib/inliner.php +++ b/lib/inliner.php @@ -48,8 +48,14 @@ function minifyCss($css) { // Remove whitespace $css = preg_replace('/\s+/', ' ', $css); + // Remove unnecessary semicolons + $css = str_replace(';}', '}', $css); + // Remove spaces around colons - //$css = str_replace(' ', '', $css); + $css = str_replace(': ', ':', $css); + + // Remove spaces around commas + $css = str_replace(', ', ',', $css); return trim($css); }