LESSed up the minification logic
This commit is contained in:
parent
b31746b1c2
commit
1154a1d901
2 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ class Dynamic extends Object
|
|||
|
||||
// Minifies CSS with a few basic character replacements.
|
||||
$stylesheet = file_get_contents($original_filename);
|
||||
$stylesheet = str_replace(array("\t", "\n", ', ', ' {', ': ', ';}', ' '), array('', '', ',', '{', ':', '}', ''), $stylesheet);
|
||||
$stylesheet = str_replace(array("\t", "\n", ', ', ' {', ': ', ';}', '{ ', '; '), array('', '', ',', '{', ':', '}', '{', ';'), $stylesheet);
|
||||
$stylesheet = preg_replace('/\/\*.+?\*\//', '', $stylesheet);
|
||||
file_put_contents($minified_filename, $stylesheet);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue