<?php
class CssMin {
  public static function minify($buffer)
  {
      // Remove comments
      $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
      // Remove space after colons
      $buffer = str_replace(': ', ':', $buffer);
      // Remove whitespace
      $buffer = str_replace( array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);
   
      return $buffer;
  }
}
