-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap 3 fails to compile #432
Comments
It's the parameter list of the gradients mixins, because they are now separated with semicolons instead of commas. |
Got it. http://lesscss.org/#-parametric-mixins says: Parameters are either semicolon or comma separated. It is recommended to use semicolon. The symbol comma has double meaning: it can be interpreted either as a mixin parameters separator or css list separator. Using comma as mixin separator makes it impossible to create comma separated lists as an argument. On the other hand, if the compiler sees at least one semicolon inside mixin call or declaration, it assumes that arguments are separated by semicolons and all commas belong to css lists: Maybe the solution is in the $delim variable in here: https://github.com/leafo/lessphp/blob/master/lessc.inc.php#L2811 |
...and further information regarding "named parameters", which might not be implemented in lessphp atm: less/less.js#268 |
@krnlde yeah, you're right... |
You would have to alter the implementation of the mixins aswell. For example in the https://github.com/twitter/bootstrap/blob/3.0.0-wip/less/dropdowns.less#L71. No solution for the future. The lessphp compiler has to work the same as the less.js. |
In case anyone's interested, I decided to fork Bootstrap and keep a lessphp-compatible version. |
Thank you! Unfortunately this isn't the right move. The improvements in less.js absolutely make sense. And all further releases of Bootstrap will rely on them. Therefore lessphp should support them in longterm. But for now I appreciate your fork very much :) |
Yes, I agree. They do make sense and they do make writing less easier! |
👍 |
I have a issue with Bootstrap 3 too. It falls into a infinite loop and can't compile it. Error is in: lessc.inc.php on line 1252. |
Hello there @jaggi |
@aristath thanks for the offer but for the time being I've changed to using recess which has a watch function so compiles each time I make changes. It allows me to get around any of the current issues until lessphp is updated. |
Is lessphp still in development; are we likely to see the changes required for Bootstrap 3 to be made? |
@dwightwatson as mentioned above, feel free to use my branch of Bootstrap 3.0 until lessphp gets updated. |
I understand, and I appreciate the offer. I might do that in the meantime for development, but am concerned about relying on lessphp for the future of my projects if it is no longer being developed/maintained. |
As far as I know this prohect is properly maintained. |
@aristath still having the same issues with your fork in lessphp (reaching maximum function nesting level). Thanks for all the work thought :) Can someone send me a compiled (css) version of bootstrap 3? |
@sergiodlopes you can grab it pre-compiled from the docs: https://github.com/twitter/bootstrap/blob/3.0.0-wip/docs/assets/css/bootstrap.css |
@aristath Thanks! :) |
+1 |
HELP! |
yelp |
+1 please fix it soon. THANX!!! |
in lessc.inc.php:2793 (inside function argumentValues), you can change the following:
to
and you can now call mixins with either comma or semicolon. Ugly but what're we going to do. But now there is another problem; named parameters like:
(dropdowns.less:76) |
You can change less files, like follow.
|
It's coming, just gonna take me some time because lessphp is quite behind. |
master |
This 6-line project works fine for me. composer.json
index.php
I'd check that there's not something else in your environment getting in the way |
UPDATE: Twitter bootstrap 3 no longer works if pulling master. The last working commit is 727a91de1c. So pull that commit for the time being to get it playing nice with lessphp. The breaking commit appears to be this one... 265fda7903 - hopefully mr leafo will have some ideas. For anyone unsure how to get to that commit just clone bootstrap as normal and then create a branch from that commit: git checkout -b working_lessphp 727a91de1c |
I am also having problems with Bootstrap 3.0 release. I'm using Composer to install Lessphp and Bootstrap, would anyone know how I can pull from a commit that works via Composer? |
"leafo/lessphp": "0.4.0" |
@Pathsofdesign Peters right that you need the 4.0 release of lessphp but you will also need lock to the last working commit on bootstrap, something like this might work: "require": { I dont use composer to install bootstrap and packagist seems to reference a different branch for composer install so Im not 100% on this. |
I may have interpreted @Pathsofdesign's reference to Bootstrap 3.0 a little too literally (i.e. to mean the 3.0.0 stable release). However, for the benefit of anybody wanting to get as closer to the dev-master as possible, @dwall80's suggestion works. |
@petercoles no problem, I wasn't real clear with my comment. After utilizing Bootstrap's commit #727a91de1c and LessPHP 0.4.0, I started receiving this error on compile: ".pull-right is undefined: line: 60" I had to roll with an earlier commit of LessPHP and Bootstrap to work via Composer. "leafo/lessphp": "dev-master#85bd4557920d5f4fcbf41beb621e91b842e3621b", Solution found here: http://stackoverflow.com/questions/19059069/asseticdump-fails-with-pull-right-is-undefined-line-60/19061496#19061496 |
That's strange as
and
work fine for me. |
@petercoles,"leafo/lessphp": "0.4.0" worked for me too when using plessc to compile from the command line but I got the same error as Pathsofdesign when trying to compile via basset (laravel asset manager package) - not sure if this is significant. |
New: lessphp 0.4.0, compiles Bootstrap 3!!! see Changelog Thanks! :) |
@tomsrduy Have you tried it? Because it said it did previously but at as written in the comments it doesn't compile past a certain breaking commit even with the latest release of lessphp. |
Doesn't work for me @tomsarduy. Working with twbs/bootstrap@a58c83a (currently latest) It now sais: |
Hello, I have comment the:
in #491 My solution (not a solution), just for work, was comment the throw. Thanks. |
Just comment the line brings another error: Fatal error: Uncaught exception 'Exception' with message '.make-grid is undefined: path/less/bootstrap.less on line 50' in path/php/lessc.inc.php:3521 Stack trace: |
Hello, I use this in composer for leafo :
And just comment line 617 in lessc.inc.php works. |
The following currently is working for me thanks to @dwall80 "require": {
"leafo/lessphp": "0.4.0",
"twitter/bootstrap": "dev-master#727a91de1c"
} |
lessPHP failed to compile v3.0.2. Seem to be in grid.less.. |
+1 |
Seems to be caused by. This is the only file having Full stack trace.
|
FYI https://github.com/cbekir/lessphp compiles the latest bootstrap dist. |
@krnlde it compiles, but with errors. For example, the widths for all the columns are not calculated. |
Oh OK! Thanks |
@krnlde thx to your fork
|
Doesn't it have to be
|
@krnlde I don't think so as the composer.json's name tag is |
Closing this one. |
Bootstrap 3 broke on this commit: twbs/bootstrap@60575df#diff-3
The problem is on line 253 of the mixins.less file there, but I can't figure out what it is..
The text was updated successfully, but these errors were encountered: