lessphp icon indicating copy to clipboard operation
lessphp copied to clipboard

Parse error with bootsrap v3.3.4

Open CsFender opened this issue 9 years ago • 9 comments

"parse error: failed at `&:extend(.clearfix all);"

in mixins/grid.less on line 11

CsFender avatar Apr 01 '15 09:04 CsFender

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

lweel avatar Apr 02 '15 15:04 lweel

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.

dleffler avatar Apr 02 '15 16:04 dleffler

:+1:

tirithen avatar May 27 '15 11:05 tirithen

Same error: Error making CSS files: parse error: failed at &:extend(.clearfix all); /MYFOLDER/less/bootstrap/mixins/grid.less on line 11

glerner avatar May 31 '15 07:05 glerner

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

glerner avatar May 31 '15 22:05 glerner

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>'; }

glerner avatar Jun 01 '15 00:06 glerner

+++ bootsrap v3.3.5 lessphp 0.5.0 parse error: failed at `&:extend(.clearfix all);

andrtechno avatar Jul 19 '15 06:07 andrtechno

@andrtechno use https://github.com/oyejorge/less.php because this repo it seems died

pafnuty avatar Jul 19 '15 16:07 pafnuty

nice thx

andrtechno avatar Jul 19 '15 17:07 andrtechno