<?php
include 'root.css';
include 'main.css';
?>
.color {
color: red;
}
<style>
.color {
color: <?php echo $color; ?>;
}
</style>
<?php
header('Content-type: text/css');
ob_start("compress");
function compress($buffer) {
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!','', $buffer);
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
return $buffer;
}
foreach (glob("*.css") as $css) {
include_once $css;
}
ob_end_flush();
?>