Your ROOT_URL in app.ini is https://code.exacti.com.br/ but you are visiting https://git.exacti.com.br/ExacTI/phacil-framework/blame/commit/b711bea0fead6d3713f5c42e0d426e1ceb01ea26/system/ecompress/cssMin.php You should set ROOT_URL correctly, otherwise the web may not work correctly.
A super easy PHP Framework for web development! https://github.com/exacti/phacil-framework

15 lines
418 B

6 years ago
<?php
/**
* @param mixed $css
* @return string[]|string|null
*/
6 years ago
function minimizeCSS($css){
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
$css = preg_replace('/\/\*((?!\*\/).)*\*\//', '', $css); // negative look ahead
$css = preg_replace('/\s{2,}/', ' ', $css);
$css = preg_replace('/\s*([:;{}])\s*/', '$1', $css);
$css = preg_replace('/;}/', '}', $css);
return $css;
}