Skip to content

Commit

Permalink
feat: support cssDir paths
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 8, 2023
1 parent 520cc30 commit 77f9e05
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions StylesArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ public function render($options = [])
$opt->setArray($this->options);
$opt->setArray($options);

// make sure that cssDir is a relative path
// if a path was provided we strip the pw root
$opt->cssDir = str_replace(
$this->wire->config->paths->root,
$this->wire->config->urls->root,
$opt->cssDir
);

$this->parseLessFiles($opt);
$out = $this->renderAssets($opt);
if ($out) $out = $this->addInfo($opt) . $out;
Expand Down

0 comments on commit 77f9e05

Please sign in to comment.