private function CSSCompression_Compress::rulesets in Advanced CSS/JS Aggregation 6
Same name and namespace in other branches
- 7 advagg_css_compress/css-compressor-3.x/src/lib/Compress.inc \CSSCompression_Compress::rulesets()
Focus compressions on each rule set
Parameters
(array) setup: Array containing selectors and rule sets:
1 call to CSSCompression_Compress::rulesets()
- CSSCompression_Compress::compress in advagg_css_compress/
css-compressor-3.x/ src/ lib/ Compress.inc - Centralized function to run css compression.
File
- advagg_css_compress/
css-compressor-3.x/ src/ lib/ Compress.inc, line 124
Class
- 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;
}