mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-61529 core: update lib scssphp to version 0.7.5
This commit is contained in:
parent
b63a3b04b1
commit
c8842113a7
28 changed files with 834 additions and 564 deletions
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
@ -53,10 +53,10 @@ class Compressed extends Formatter
|
|||
}
|
||||
}
|
||||
|
||||
echo $inner . implode($glue, $block->lines);
|
||||
$this->write($inner . implode($glue, $block->lines));
|
||||
|
||||
if (! empty($block->children)) {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
@ -51,10 +51,10 @@ class Crunched extends Formatter
|
|||
}
|
||||
}
|
||||
|
||||
echo $inner . implode($glue, $block->lines);
|
||||
$this->write($inner . implode($glue, $block->lines));
|
||||
|
||||
if (! empty($block->children)) {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
@ -52,13 +52,13 @@ class Debug extends Formatter
|
|||
$indent = $this->indentStr();
|
||||
|
||||
if (empty($block->lines)) {
|
||||
echo "{$indent}block->lines: []\n";
|
||||
$this->write("{$indent}block->lines: []\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($block->lines as $index => $line) {
|
||||
echo "{$indent}block->lines[{$index}]: $line\n";
|
||||
$this->write("{$indent}block->lines[{$index}]: $line\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,13 +70,13 @@ class Debug extends Formatter
|
|||
$indent = $this->indentStr();
|
||||
|
||||
if (empty($block->selectors)) {
|
||||
echo "{$indent}block->selectors: []\n";
|
||||
$this->write("{$indent}block->selectors: []\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($block->selectors as $index => $selector) {
|
||||
echo "{$indent}block->selectors[{$index}]: $selector\n";
|
||||
$this->write("{$indent}block->selectors[{$index}]: $selector\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ class Debug extends Formatter
|
|||
$indent = $this->indentStr();
|
||||
|
||||
if (empty($block->children)) {
|
||||
echo "{$indent}block->children: []\n";
|
||||
$this->write("{$indent}block->children: []\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -109,8 +109,10 @@ class Debug extends Formatter
|
|||
{
|
||||
$indent = $this->indentStr();
|
||||
|
||||
echo "{$indent}block->type: {$block->type}\n" .
|
||||
"{$indent}block->depth: {$block->depth}\n";
|
||||
$this->write("{$indent}block->type: {$block->type}\n" .
|
||||
"{$indent}block->depth: {$block->depth}\n");
|
||||
|
||||
$this->currentBlock = $block;
|
||||
|
||||
$this->blockSelectors($block);
|
||||
$this->blockLines($block);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
@ -59,10 +59,10 @@ class Expanded extends Formatter
|
|||
}
|
||||
}
|
||||
|
||||
echo $inner . implode($glue, $block->lines);
|
||||
$this->write($inner . implode($glue, $block->lines));
|
||||
|
||||
if (empty($block->selectors) || ! empty($block->children)) {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
@ -66,10 +66,10 @@ class Nested extends Formatter
|
|||
}
|
||||
}
|
||||
|
||||
echo $inner . implode($glue, $block->lines);
|
||||
$this->write($inner . implode($glue, $block->lines));
|
||||
|
||||
if (! empty($block->children)) {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,9 +80,9 @@ class Nested extends Formatter
|
|||
{
|
||||
$inner = $this->indentStr();
|
||||
|
||||
echo $inner
|
||||
$this->write($inner
|
||||
. implode($this->tagSeparator, $block->selectors)
|
||||
. $this->open . $this->break;
|
||||
. $this->open . $this->break);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,13 +94,13 @@ class Nested extends Formatter
|
|||
$this->block($child);
|
||||
|
||||
if ($i < count($block->children) - 1) {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
|
||||
if (isset($block->children[$i + 1])) {
|
||||
$next = $block->children[$i + 1];
|
||||
|
||||
if ($next->depth === max($block->depth, 1) && $child->depth >= $next->depth) {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,6 +120,9 @@ class Nested extends Formatter
|
|||
return;
|
||||
}
|
||||
|
||||
$this->currentBlock = $block;
|
||||
|
||||
|
||||
$this->depth = $block->depth;
|
||||
|
||||
if (! empty($block->selectors)) {
|
||||
|
@ -139,11 +142,11 @@ class Nested extends Formatter
|
|||
if (! empty($block->selectors)) {
|
||||
$this->indentLevel--;
|
||||
|
||||
echo $this->close;
|
||||
$this->write($this->close);
|
||||
}
|
||||
|
||||
if ($block->type === 'root') {
|
||||
echo $this->break;
|
||||
$this->write($this->break);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* SCSSPHP
|
||||
*
|
||||
* @copyright 2012-2017 Leaf Corcoran
|
||||
* @copyright 2012-2018 Leaf Corcoran
|
||||
*
|
||||
* @license http://opensource.org/licenses/MIT MIT
|
||||
*
|
||||
|
@ -47,4 +47,19 @@ class OutputBlock
|
|||
* @var \Leafo\ScssPhp\Formatter\OutputBlock
|
||||
*/
|
||||
public $parent;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $sourceName;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
public $sourceLine;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
public $sourceColumn;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue