Skip to content

Commit 38f2641

Browse files
committed
Fix #585 : the first level of selector has to be collapsed with space
1 parent 1d93073 commit 38f2641

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/Compiler.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,13 +1399,16 @@ protected function collapseSelectors($selectors)
13991399

14001400
foreach ($selectors as $selector) {
14011401
$output = '';
1402+
foreach ($selector as $node) {
1403+
$output .= ($output ? ' ' : '');
14021404

1403-
array_walk_recursive(
1404-
$selector,
1405-
function ($value, $key) use (&$output) {
1406-
$output .= $value;
1407-
}
1408-
);
1405+
array_walk_recursive(
1406+
$node,
1407+
function ($value, $key) use (&$output) {
1408+
$output .= $value;
1409+
}
1410+
);
1411+
}
14091412

14101413
$parts[] = $output;
14111414
}

0 commit comments

Comments
 (0)