src/PleasingMinifyFilter.php
private function minifySpaceCSS($input)
  {
    // Whitespace around !important;
    $output = preg_replace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $input);
    // Whitespace around parenthesis and brackets.
    $output = preg_replace('/\s+([\]\)])/', '$1', $output);
    // Whitespace around :, except in selectors
    $output = preg_replace('/([\[(:])\s+/', '$1', $output);
    $output = preg_replace('/\s+(:)(?![^\}]*\{)/', '$1', $output);
    // Whitespace & semicolon followed by closing bracket
    $output = preg_replace('/;}/', '}', $output);

    return $output;
  }
private function minifySpaceCSS($input)
  {
    // Whitespace around !important;
    $output = preg_replace('/\s*([\*$~^|]?+=|[{};,>~]|!important\b)\s*/', '$1', $input);
    // Whitespace around parenthesis and brackets.
    $output = preg_replace('/\s+([\]\)])/', '$1', $output);
    // Whitespace around :, except in selectors
    $output = preg_replace('/([\[(:])\s+/', '$1', $output);
    $output = preg_replace('/\s+(:)(?![^\}]*\{)/', '$1', $output);
    // Whitespace & semicolon followed by closing bracket
    $output = preg_replace('/;}/', '}', $output);

    return $output;
  }
Remove space from CSS files, including whitespaces around !important, parentheses, brackets, colons, and semicolons
(that are followed by a closing bracket).

@param  string  $input  The CSS from which to remove spacing.

@return string          The modified CSS.