You are here

private function CSSCompression_Compress::readability in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg_css_compress/css-compressor-3.x/src/lib/Compress.inc \CSSCompression_Compress::readability()

Formats the compressed rule sets into a stylesheet

Parameters

(array) setup: Array containing selectors and rule sets:

1 call to CSSCompression_Compress::readability()
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 178

Class

CSSCompression_Compress
CSS Compressor [VERSION] [DATE] Corey Hart @ http://www.codenothing.com

Code

private function readability($setup) {

  // Format css to users preference
  $css = $this->Format
    ->readability($this->options['readability'], $setup['selectors'], $setup['details']);

  // Intros
  foreach ($setup as $value) {
    if ($value && is_string($value)) {
      $css = $value . $css;
    }
  }

  // Remove escapables
  $css = $this->Cleanup
    ->removeInjections($css);
  return $css;
}