PHP 7.2 버전용으로 올림!
This commit is contained in:
+4
-6
@@ -207,7 +207,7 @@ class Server
|
||||
$elapsed = round((microtime(true) - $start), 4);
|
||||
|
||||
$v = Version::VERSION;
|
||||
$t = date('r');
|
||||
$t = gmdate('r');
|
||||
$css = "/* compiled by scssphp $v on $t (${elapsed}s) */\n\n" . $css;
|
||||
$etag = md5($css);
|
||||
|
||||
@@ -329,7 +329,7 @@ class Server
|
||||
try {
|
||||
list($css, $etag) = $this->compile($input, $output);
|
||||
|
||||
$lastModified = gmdate('D, d M Y H:i:s', filemtime($output)) . ' GMT';
|
||||
$lastModified = gmdate('r', filemtime($output));
|
||||
|
||||
header('Last-Modified: ' . $lastModified);
|
||||
header('Content-type: text/css');
|
||||
@@ -371,7 +371,7 @@ class Server
|
||||
return;
|
||||
}
|
||||
|
||||
$lastModified = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';
|
||||
$lastModified = gmdate('r', $mtime);
|
||||
header('Last-Modified: ' . $lastModified);
|
||||
|
||||
echo file_get_contents($output);
|
||||
@@ -510,8 +510,6 @@ class Server
|
||||
$this->scss = $scss;
|
||||
$this->showErrorsAsCSS = false;
|
||||
|
||||
if (! ini_get('date.timezone')) {
|
||||
throw new ServerException('Default date.timezone not set');
|
||||
}
|
||||
date_default_timezone_set('UTC');
|
||||
}
|
||||
}
|
||||
|
||||
+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