Monday, 2 December 2019

leafo/scssphp Ignoring files in sub-directories

leafo/scssphp works fine, except when the files are in the sub-directories, I tried addImportPath but still couldn't include those sub-directory files, here is my scss code.

.my-parent-container {
    background-color: $body-background;
    @import './base/reset';
    @import './abstracts/placeholders';
    @import './base/typography';
    @import './layout/header';
    @import './components/buttons';
    @import ./'components/switch_button';
}

PHP code

$scss = new \Leafo\ScssPhp\Compiler();
$scss_path = base_path('public/assets/tmpl-scss/style.scss');
$scss->setVariables($colors);
$css = $scss->compile('@import "'.$scss_path.'"');

the files such as reset, placeholders, typography,header,buttons and switch_button are not added.

Thank you



from leafo/scssphp Ignoring files in sub-directories

No comments:

Post a Comment