Closed egolive closed 5 years ago
Hello, I try to compile bootstrap into a container.
This is my code:
use Leafo\ScssPhp\Compiler; $scss = new Compiler(); if( !ini_get('safe_mode') ){ set_time_limit(0); } $path = plugin_dir_path( dirname( __FILE__ ) ); $directors = array( $path.'assets/css/bootstrap/scss/', $path.'assets/css/bootstrap/scss/mixins/', $path.'assets/css/bootstrap/scss/utilities/', $path.'assets/css/bootstrap/scss/vendor/' ); $scss->setImportPaths($directors); $compiledBootstrap .= $scss->compile('@import "bootstrap.scss";'); $scssIn = file_get_contents(plugin_dir_path( dirname( __FILE__ ) ) . '/assets/css/ccs_style.scss'); $scssIn = str_replace('$compiledBootstrap', $compiledBootstrap, $scssIn); $cssOut = $scss->compile($scssIn); file_put_contents(plugin_dir_path( dirname( __FILE__ ) ) . '/assets/css/ccs_style.css', $cssOut);
This is the scss
.ccs-content-area { $compiledBootstrap; box-sizing: border-box; font-family: sans-serif; line-height: 1.15; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0; font-weight: 400; color: #212529; text-align: left; background-color: #fff; position: relative; margin-bottom: 25px; margin-top: 25px; ... @include media-breakpoint-only(xs) { .btn-block-res { display: block; width: 100%; font-size: 14px; } } ... }
I become the following error message: Leafo\ScssPhp\Exception\CompilerException: Undefined mixin media-breakpoint-only: line: 6970
Does someone know what I'm doing wrong?
This project has been moved to https://github.com/scssphp/scssphp
Thank you
https://github.com/scssphp/scssphp/issues/15
Hello, I try to compile bootstrap into a container.
This is my code:
This is the scss
I become the following error message: Leafo\ScssPhp\Exception\CompilerException: Undefined mixin media-breakpoint-only: line: 6970
Does someone know what I'm doing wrong?