Skip to content

Commit 81fa2ce

Browse files
committed
Allow a separator to be passed to functions.
Also take separator and arguments from given RuleValueList (if any)
1 parent 7a16ac6 commit 81fa2ce

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Sabberworm/CSS/Value/CSSFunction.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ class CSSFunction extends ValueList {
66

77
private $sName;
88

9-
public function __construct($sName, $aArguments) {
9+
public function __construct($sName, $aArguments, $sSeparator = ',') {
10+
if($aArguments instanceof RuleValueList) {
11+
$sSeparator = $aArguments->getListSeparator();
12+
$aArguments = $aArguments->getListComponents();
13+
}
1014
$this->sName = $sName;
11-
parent::__construct($aArguments);
15+
parent::__construct($aArguments, $sSeparator);
1216
}
1317

1418
public function getName() {

0 commit comments

Comments
 (0)