leafo / scssphp

SCSS compiler written in PHP
MIT License
1.34k stars 214 forks source link

@import "file.scss" not working in server mode #619

Closed pflind closed 5 years ago

pflind commented 5 years ago

From the documentation:

use Leafo\ScssPhp\Compiler;
use Leafo\ScssPhp\Server;

$scss = new Compiler();
$scss->setFormatter('Leafo\ScssPhp\Formatter\Compressed');

$server = new Server('stylesheets', null, $scss);
$server->serve();

The compiled file does not include the code from imported files, instead it's outputting @import "whateverfile.scss";

GrupoWebex commented 5 years ago

Maybe should you add import path?

$scss->addImportPath('rootpathtoimport');
pflind commented 5 years ago

Thank you @GrupoWebex ☺️