forked from Adleraci/adlerka.top
test inlining
This commit is contained in:
parent
b5f16cc109
commit
f46690a814
@ -43,14 +43,11 @@ function inlineScriptFromSrc($inputString) {
|
|||||||
|
|
||||||
function minifyCss($css) {
|
function minifyCss($css) {
|
||||||
// Remove comments
|
// Remove comments
|
||||||
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
|
//$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
|
||||||
|
|
||||||
// Remove whitespace
|
// Remove whitespace
|
||||||
$css = preg_replace('/\s+/', ' ', $css);
|
$css = preg_replace('/\s+/', ' ', $css);
|
||||||
|
|
||||||
// Remove unnecessary semicolons
|
|
||||||
$css = str_replace(';}', '}', $css);
|
|
||||||
|
|
||||||
// Remove spaces around colons
|
// Remove spaces around colons
|
||||||
$css = str_replace(' ', '', $css);
|
$css = str_replace(' ', '', $css);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user