You are here

private function CSSCompression_Format::minimum in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg_css_compress/css-compressor-3.x/src/lib/Format.inc \CSSCompression_Format::minimum()

Returns minimum readability, breaking after every selector and it's rule set

Parameters

(array) selectors: Array of selectors:

(array) details: Array of declarations:

File

advagg_css_compress/css-compressor-3.x/src/lib/Format.inc, line 132

Class

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

Code

private function minimum($selectors, $details) {
  $css = '';
  foreach ($selectors as $k => $v) {
    if (strpos($v, $this->token) === 0) {
      $css .= substr($v, strlen($this->token));
      $css .= $details[$k];
      continue;
    }
    else {
      if ($details[$k] && $details[$k] != '') {
        $css .= "{$v}{" . $details[$k] . "}\n";
      }
    }
  }
  return $css;
}