You are here

private function CSSmin::processCalc in Advanced CSS/JS Aggregation 7.2

File

advagg_css_compress/yui/CSSMin.inc, line 980

Class

CSSmin

Code

private function processCalc($matches) {
  $token = preg_replace('/\\)([+\\-]{1})/', ') $1', preg_replace('/([+\\-]{1})\\(/', '$1 (', trim(preg_replace('/\\s*([*\\/(),])\\s*/', '$1', $matches[2]))));
  $preservedTokenPlaceholder = $this
    ->registerPreservedToken($token);
  return 'calc(' . $preservedTokenPlaceholder . ')';
}