Skip to content

Commit ddebe1a

Browse files
authored
Fix #573
1 parent e288c2a commit ddebe1a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Compiler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,9 @@ public function compileValue($value)
26992699
$b = round($b);
27002700

27012701
if (count($value) === 5 && $value[4] !== 1) { // rgba
2702-
return 'rgba(' . $r . ', ' . $g . ', ' . $b . ', ' . $value[4] . ')';
2702+
$a = new Node\Number($value[4]);
2703+
2704+
return 'rgba(' . $r . ', ' . $g . ', ' . $b . ', ' . $a . ')';
27032705
}
27042706

27052707
$h = sprintf('#%02x%02x%02x', $r, $g, $b);
@@ -4336,7 +4338,7 @@ protected function libRgb($args)
43364338
protected function libRgba($args)
43374339
{
43384340
if ($color = $this->coerceColor($args[0])) {
4339-
$num = ! isset($args[1]) ? $args[3] : $args[1];
4341+
$num = isset($args[3]) ? $args[3] : $args[1];
43404342
$alpha = $this->assertNumber($num);
43414343
$color[4] = $alpha;
43424344

0 commit comments

Comments
 (0)