Thanks for this, it was very helpful. What I do now is have a project.less file in the same directory as bootstrap.less. As you recommended it includes bootstrap on the first line. Then I override add or override styles as needed. I also modify the variables.less file, but with clear comments on which items I modified. When I am ready to generate my CSS, I run less on my project.less file. Doing this made it much much easier for me to upgrade to 2.1.1.
On Tuesday, August 14, 2012 5:56:39 AM UTC-4, Barry vd. Heuvel wrote: > I create and style.less file. On the first line of that file, I import > bootstrap/bootstrap.less, to import the bootstrap code. > I edit bootstrap.less to import only what I need, and change > variables.less to fit my needs. > > After that, I place my custom less/css after that first line. > > THis way, I can simply update to a new version, with only changing > bootstrap.less and variables.less. And also, the file gets compiled > directly (without checking all files for changes). > > This will lead to unnecessary code, but is faster in development and > updating.. > > (It would be better of LESS would detect conflicting values and remove > duplicates..) > > On Tue, Aug 14, 2012 at 11:51 AM, Backspace > <[email protected]<javascript:> > > wrote: > >> I make a custom css file for anything not in less. >> >> I don't touch anything else, but come to think of it I modify the less >> files directly. That's not so good for an upgrade. >> >> >> >> On Sunday, 12 August 2012 03:23:05 UTC+10, sams wrote: >> >>> I copy bootstrap.less and responsive modifiy them to use theme specific >>> versions of bootstraps less lib >>> (the modified less is in a subdir) >>> >>> then when you apply upgrades of bootstrap to your app you can compare >>> the appropriate files with ease >>> >>> >>> >>> On 11 August 2012 17:37, Santo <[email protected]> wrote: >>> >>>> I'm just curious, what is best practice for editing the bootstrap css >>>> and making custom css. Should I modify the bootstrap files or should I >>>> import my own .less file at the bottom in bootstrap.less and override? >>>> >>>> By editing the bootstrap files there might be problem to install future >>>> updates? But by overriding I will only add to the css footprint. What do >>>> you think? >>>> >>> >>> >
