Skip to content

Commit 759f087

Browse files
authored
Fix minified CSS variable with leading whitespaces
Fixes #378
1 parent dfae066 commit 759f087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CSS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ protected function extractCustomProperties()
740740
// PHP only supports $this inside anonymous functions since 5.4
741741
$minifier = $this;
742742
$this->registerPattern(
743-
'/(?<=^|[;}])(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m',
743+
'/(?<=^|[;}])\s*(--[^:;{}"\'\s]+)\s*:([^;{}]+)/m',
744744
function ($match) use ($minifier) {
745745
$placeholder = '--custom-'. count($minifier->extracted) . ':0';
746746
$minifier->extracted[$placeholder] = $match[1] .':'. trim($match[2]);

0 commit comments

Comments
 (0)