Loads SCSS files using the PHP implementation of scss, scssphp.
Scss files are mostly compatible, but there are slight differences.
@link http://leafo.net/scssphp/
@author Bart van den Burg <bart@samson-it.nl>
Expanded class hierarchy of ScssphpFilter
class ScssphpFilter implements FilterInterface {
public function filterLoad(AssetInterface $asset) {
$root = $asset
->getSourceRoot();
$path = $asset
->getSourcePath();
$lc = new \scssc();
if ($root && $path) {
$lc
->addImportPath(dirname($root . '/' . $path));
}
$asset
->setContent($lc
->compile($asset
->getContent()));
}
public function filterDump(AssetInterface $asset) {
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ScssphpFilter:: |
public | function |
Filters an asset after it has been loaded. Overrides FilterInterface:: |
|
ScssphpFilter:: |
public | function |
Filters an asset just before it's dumped. Overrides FilterInterface:: |