PHP 7.2 버전용으로 올림!
This commit is contained in:
+15
-6
@@ -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);
|
||||
|
||||
Vendored
+15
@@ -1302,6 +1302,21 @@ class Parser
|
||||
{
|
||||
$s = $this->seek();
|
||||
|
||||
if ($this->literal('url(') && $this->match('data:([a-z]+)\/([a-z0-9.+-]+);base64,', $m, false)) {
|
||||
$len = strspn($this->buffer, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyxz0123456789+/=', $this->count);
|
||||
|
||||
$this->count += $len;
|
||||
|
||||
if ($this->literal(')')) {
|
||||
$content = substr($this->buffer, $s, $this->count - $s);
|
||||
$out = [Type::T_KEYWORD, $content];
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->seek($s);
|
||||
|
||||
if ($this->literal('not', false) && $this->whitespace() && $this->value($inner)) {
|
||||
$out = [Type::T_UNARY, 'not', $inner, $this->inParens];
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -18,5 +18,5 @@ namespace Leafo\ScssPhp;
|
||||
*/
|
||||
class Version
|
||||
{
|
||||
const VERSION = 'v0.7.5';
|
||||
const VERSION = 'v0.7.6';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user