/** * Make clean CSS * * @param unknown_type $path * @param unknown_type $name * @return unknown */ function make_clean_css($path, $name) { App::import('Vendor', 'csspp' . DS . 'csspp'); $data = file_get_contents($path); $csspp = new csspp(); $output = $csspp->compress($data); $ratio = 100 - (round(strlen($output) / strlen($data), 3) * 100); $output = " /* file: $name, ratio: $ratio% */ " . $output; return $output; }
/** * Enter description here... * * @param unknown_type $path * @param unknown_type $name * @return unknown */ function make_clean_css($path, $name) { require VENDORS . 'csspp' . DS . 'csspp.php'; $data = file_get_contents($path); $csspp = new csspp(); $output = $csspp->compress($data); $ratio = 100 - round(strlen($output) / strlen($data), 3) * 100; $output = " /* file: {$name}, ratio: {$ratio}% */ " . $output; return $output; }