Run individual compression techniques on each property of a selector
Paramètres
(string) row: Selector properties:
1 call to CSSCompression_Setup::details()
- CSSCompression_Setup::setup dans advagg_css_compress/
css-compressor-3.x/ src/ lib/ Setup.inc - Setup selector and details arrays for compression methods
Fichier
-
advagg_css_compress/
css-compressor-3.x/ src/ lib/ Setup.inc, line 236
Classe
- CSSCompression_Setup
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function details($row) {
$row = preg_split($this->rsemicolon, $row);
$parts = array();
$details = '';
foreach ($row as $line) {
// Set loopers
$parts = preg_split($this->rcolon, $line, 2);
$prop = '';
$value = '';
// Property
if (isset($parts[0]) && ($parts[0] = trim($parts[0])) != '') {
$prop = $parts[0];
}
// Value
if (isset($parts[1]) && ($parts[1] = trim($parts[1])) != '') {
$value = preg_replace($this->rbang, ' !', $parts[1]);
}
// Fail safe, remove unspecified property/values
if ($prop == '' || $value == '') {
continue;
}
// Run the tag/element through each compression
list($prop, $value) = $this->Individuals
->individuals($prop, $value);
// Add counter to before stats
$this->stats['before']['props']++;
// Store the compressed element
$details .= "{$prop}:" . preg_replace($this->rspacebang, '!', $value) . ";";
}
return $details;
}