lessphp
lessphp copied to clipboard
Parse error with bootsrap v3.3.4
"parse error: failed at `&:extend(.clearfix all);"
in mixins/grid.less on line 11
Same problem here. While parsing the BASE 2 framework. (https://github.com/matthewhartman/base)
Fatal Error: parse error: failed at &:extend(.font-bold); }
web/less/base/_global.less on line 23
I'm pretty sure that lessphp does NOT support 'extend' (which is needed to compile bootstrap v3) Look at the older issues...you might try less.php or iless.
:+1:
Same error:
Error making CSS files: parse error: failed at &:extend(.clearfix all);
/MYFOLDER/less/bootstrap/mixins/grid.less on line 11
Even if you aren't going to update to support LESS :extend, catch the Exception so it doesn't crash PHP, okay?
throwError('LESS :extend not supported, ignoring this code');
PHP Fatal error: Uncaught exception 'Exception' with message 'parse error: failed at &:extend(.clearfix all);
/PATH/public_html/SUBDIR/wp-content/themes/THEME/less/bootstrap/mixins/grid.less on line 11' in /PATH/public_html/SUBDIR/wp-content/plugins/assetsminify/vendor/leafo/lessphp/lessc.inc.php:3460
Stack trace:
#0 /PATH/public_html/SUBDIR/wp-content/plugins/assetsminify/vendor/leafo/lessphp/lessc.inc.php(2273): lessc_parser->throwError()
#1 /PATH/public_html/SUBDIR/wp-content/plugins/assetsminify/vendor/leafo/lessphp/lessc.inc.php(121): lessc_parser->parse('// Grid system?...')
#2 /PATH/public_html/SUBDIR/wp-content/plugins/assetsminify/vendor/leafo/lessphp/lessc.inc.php(753): lessc->tryImport(Array, Object(stdClass), Object(stdClass))
#3 /PATH/public_html/SUBDIR/wp-content/plugins/assetsminify/vendor/leafo/lessphp/lessc.inc.php(162): lessc->compileProp(Array, Object(stdClass), Object(stdClass))
#4 /PATH/public_html/wp in /PATH/public_html/SUBDIR/wp-content/plugins/assetsminify/vendor/leafo/lessphp/lessc.inc.php on line 3460
https://github.com/oyejorge/less.php has section on replacing leafo lessc.inc.php with oyejorge lessc.inc.php and lib/ folder from oyejorge's less.php-master.zip
require "less/lessc.inc.php"; $less = new lessc; /* addImportDir seems to have no effect at all */ /* $less->addImportDir(array('less/','less/bootstrap/',__DIR__.'/', __DIR__.'/less/', __DIR__.'/less/bootstrap/')); */ try { /* use underscore underscore DIR underscore underscore */ $less->compileFile(__DIR__."/less/style.less", "/style.css"); } catch (exception $e) { echo '<p>Error making CSS files: ' . $e->getMessage() .'</p>'; }
+++ bootsrap v3.3.5 lessphp 0.5.0 parse error: failed at `&:extend(.clearfix all);
@andrtechno use https://github.com/oyejorge/less.php because this repo it seems died
nice thx