Focus compressions on each rule set
Paramètres
(array) setup: Array containing selectors and rule sets:
1 call to CSSCompression_Compress::rulesets()
- CSSCompression_Compress::compress dans advagg_css_compress/
css-compressor-3.x/ src/ lib/ Compress.inc - Centralized function to run css compression.
Fichier
-
advagg_css_compress/
css-compressor-3.x/ src/ lib/ Compress.inc, line 124
Classe
- CSSCompression_Compress
- CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com
Code
private function rulesets($setup) {
// Do selector specific compressions
$this->Selectors
->selectors($setup['selectors']);
// Look at each group of properties as a whole, and compress/combine similiar definitions
$this->Combine
->combine($setup['selectors'], $setup['details']);
// If order isn't important, run comination functions before and after compressions to catch all instances
// Be sure to prune before hand for higher chance of matching
if ($this->options['organize']) {
$this->Cleanup
->cleanup($setup['selectors'], $setup['details']);
$this->Organize
->organize($setup['selectors'], $setup['details']);
$this->Combine
->combine($setup['selectors'], $setup['details']);
}
// Do final maintenace work, remove injected property/values
$this->Cleanup
->cleanup($setup['selectors'], $setup['details']);
// Run final counters before full cleanup
$this->finalCount($setup['selectors'], $setup['details']);
return $setup;
}