diff --git a/composer.json b/composer.json index c228f382..0f0384ba 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "ipl/orm": ">=0.5.2", "ipl/scheduler": ">=0.1.0", "ipl/stdlib": ">=0.12.0", - "fortawesome/font-awesome": "^6" + "fortawesome/font-awesome": "^6", + "wikimedia/less.php": "^3.2.1" }, "require-dev": { "ipl/html": "dev-main", diff --git a/src/LessRuleset.php b/src/LessRuleset.php index 3a55825f..2e30a4b4 100644 --- a/src/LessRuleset.php +++ b/src/LessRuleset.php @@ -3,7 +3,7 @@ namespace ipl\Web; use ArrayObject; -use Icinga\Util\LessParser; +use Less_Parser; /** * @extends ArrayObject @@ -144,10 +144,10 @@ public function addRuleset(LessRuleset $ruleset): self */ public function renderCss(): string { - $lessc = new LessParser(); - $lessc->setFormatter('compressed'); + $parser = new Less_Parser(['compress' => true]); + $parser->parse($this->renderLess()); - return $lessc->compile($this->renderLess()); + return $parser->getCss(); } /**