diff --git a/src/CSS.php b/src/CSS.php index 1b354ad..9226df2 100644 --- a/src/CSS.php +++ b/src/CSS.php @@ -740,7 +740,7 @@ class CSS extends Minify // PHP only supports $this inside anonymous functions since 5.4 $minifier = $this; $this->registerPattern( - '/(?<=^|[;}])(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m', + '/(?<=^|[;}])\s*(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m', function ($match) use ($minifier) { $placeholder = '--custom-'. count($minifier->extracted) . ':0'; $minifier->extracted[$placeholder] = $match[1] .':'. trim($match[2]);