You are here

private property CSSCompression_Trim::$trimmings in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg_css_compress/css-compressor-3.x/src/lib/Trim.inc \CSSCompression_Trim::trimmings

File

advagg_css_compress/css-compressor-3.x/src/lib/Trim.inc, line 33

Class

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

Code

private $trimmings = array(
  'patterns' => array(
    "/(?<!\\\\)(\\s+)?(?<!\\\\)([!,{};>\\~\\+\\/])(?<!\\\\)(\\s+)?/s",
    // Remove un-needed spaces around special characters
    "/url\\((?<!\\\\)\"(.*?)(?<!\\\\)\"\\)/is",
    // Remove quotes from urls
    "/url\\((?<!\\\\)'(.*?)(?<!\\\\)'\\)/is",
    // Remove single quotes from urls
    "/url\\((.*?)\\)/is",
    // Lowercase url wrapper
    "/(?<!\\\\);{2,}/",
    // Remove unecessary semi-colons
    "/(?<!\\\\)\\s+/s",
  ),
  'replacements' => array(
    '$2',
    'url($1)',
    'url($1)',
    'url($1)',
    ';',
    ' ',
  ),
);