CSS compression
Posted: Thu Oct 02, 2008 8:05 am
Loading time of a website is as important as its functionality
Edit stylesheet.php in root. On the end of file is something like this:
echo $css;
Replace that with line:
// Compress CSS output
echo str_replace('; ',';',str_replace(' }','}',str_replace('{ ','{',str_replace(array("\r\n","\r","\n","\t",' ',' ',' '),"",preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','',$css)))));
//echo $css;
Thank's to http://davidwalsh.name/quick-easy-css-c ... -using-php

echo $css;
Replace that with line:
// Compress CSS output
echo str_replace('; ',';',str_replace(' }','}',str_replace('{ ','{',str_replace(array("\r\n","\r","\n","\t",' ',' ',' '),"",preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','',$css)))));
//echo $css;
Thank's to http://davidwalsh.name/quick-easy-css-c ... -using-php