Reputation: 1143
I've built many sites over the past couple years with Bootstrap. I use lessphp for serverside compiling now, but the older sites were compiled locally in either CodeKit or Simpless.
The problem ive been running into is when those older sites need to be updated, the local compilers have been updated to use the latest version of Bootstrap less files, and they won't compile old stuff. So I usually end up just creating a css file as a bandaid and doing updates in there, which is really not ideal.
Sometimes I decide to set up serverside compiling on those old sites, but it never just magically instantly works and it takes me at least an hour to pinpoint what's going wrong.
How do other people deal with this? I am regretting ever using local compilers.
Upvotes: 3
Views: 261
Reputation: 49054
I don't find any problems compiling Twitter's Bootstrap 2.3.1. with command line compiler bundled with LESS (lessc 1.5.0 (LESS Compiler) [JavaScript]).
the local compilers have been updated to use the latest version of Bootstrap less files, and they won't compile old stuff.
Could you explain this? I don't understand. To compile for example Bootstrap 2.3.1 you will need the LESS file of that version (see: https://github.com/twbs/bootstrap/releases) but there seems no reason why you can't use a newer compiler.
Also lessphp should be able to compiler older versions of Bootstrap. At the moment there will be some issues to compile version > 3.0.0., see: https://github.com/leafo/lessphp/issues/503
Upvotes: 1
Reputation: 34642
On one page of the site you need to update, make a static page .html page and use an older version of Less.js (https://github.com/less/less.js/releases). In the head point to the less.js above that point the CSS link to the .less import file. Then do your updates. View the CSS in FireFox Developer tools "View CSS' under the magic wand CSS menu. You'll see the "embedded" css which is a perfect css file that you can then copy out and save as .css. Stick it in the http://www.refresh-sf.com/yui/ choose "CSS" file type and compress. Make a copy of your original css, stick it in a scratch folder, put the same named .css file to replace it.
Upvotes: 1