PHP 7.2 버전용으로 올림!

This commit is contained in:
2018-06-21 02:17:31 +09:00
parent c1a6dd385a
commit b402846d43
70 changed files with 377 additions and 2115 deletions
+15 -6
View File
@@ -316,9 +316,16 @@ class Compiler
$out->parent = $this->scope;
$out->selectors = $selectors;
$out->depth = $this->env->depth;
$out->sourceName = $this->env->block->sourceName;
$out->sourceLine = $this->env->block->sourceLine;
$out->sourceColumn = $this->env->block->sourceColumn;
if ($this->env->block instanceof Block) {
$out->sourceName = $this->env->block->sourceName;
$out->sourceLine = $this->env->block->sourceLine;
$out->sourceColumn = $this->env->block->sourceColumn;
} else {
$out->sourceName = null;
$out->sourceLine = null;
$out->sourceColumn = null;
}
return $out;
}
@@ -2694,7 +2701,9 @@ class Compiler
$b = round($b);
if (count($value) === 5 && $value[4] !== 1) { // rgba
return 'rgba(' . $r . ', ' . $g . ', ' . $b . ', ' . $value[4] . ')';
$a = new Node\Number($value[4], '');
return 'rgba(' . $r . ', ' . $g . ', ' . $b . ', ' . $a . ')';
}
$h = sprintf('#%02x%02x%02x', $r, $g, $b);
@@ -4331,7 +4340,7 @@ class Compiler
protected function libRgba($args)
{
if ($color = $this->coerceColor($args[0])) {
$num = ! isset($args[1]) ? $args[3] : $args[1];
$num = isset($args[3]) ? $args[3] : $args[1];
$alpha = $this->assertNumber($num);
$color[4] = $alpha;
@@ -4526,7 +4535,7 @@ class Compiler
];
if ($firstAlpha != 1.0 || $secondAlpha != 1.0) {
$new[] = $firstAlpha * $weight + $secondAlpha * ($weight - 1);
$new[] = $firstAlpha * $weight + $secondAlpha * (1 - $weight);
}
return $this->fixColor($new);