6

I'm developing a web app using python and twitter-bootstrap, and my CSS would really benefit from using LESS in order to generate my styles and themes. I want to inherit from classes provided by bootstrap, which means I've got to get the bootstrap source, and compile my LESS stylesheets against the boostrap .less files.

My question is two-fold:

1) The simplest way it seems to use LESS is not to actually compile stylesheets "on-the-fly" but to have a build step that I run each time I make changes to the styles. Is this typical? It seems like a lot of people run LESS dynamically in their server process, but it's an extra headache that I probably don't need, and I don't want to run less on the client side.

2) Thanks to LESS, my project now depends not just on bootstrap, but the bootstrap "source" - What's the best way to handle this in terms of my project management? I don't want to just absorb the whole of whatever the current version of bootstrap is into my git repos, because it seems like it would be a hassle to update it as newer versions of bootstrap come out (also feels icky!) Still though, I need to have at least the minified js/css in my project tree in order to deploy my app. How do people typically handle dependencies like this when developing web apps?

albertedevigo
  • 18,262
  • 6
  • 52
  • 58
Ryan
  • 4,179
  • 6
  • 30
  • 31
  • You might be looking for [Twitter Bootstrap Customization Best Practices](http://stackoverflow.com/questions/10451317/twitter-bootstrap-customization-best-practices). – Pavlo Sep 29 '12 at 20:04
  • I'm not actually interested in customizing bootstrap... at this point, I simply want to include some of its styles as mixins. Still, it's a helpful link. – Ryan Sep 30 '12 at 00:37
  • Are you using git, what about a sub module? – Thomas Orozco Oct 01 '12 at 10:35

2 Answers2

1
  1. There are a couple of shoices:
    1. You could use less.js in development, so you don't have to compile each time you change your less code. You just use *.less files instead of *.css
    2. You could use any of the GUI tools that will automatically recompile less code. I prefer LESS.app.
  2. I use git submodule
Vladimir Prudnikov
  • 6,974
  • 4
  • 48
  • 57
0

I would have linked you to the same post as Pavlo above. Maybe there is no best CLEAN practice for this? Neither there is any magic "package manager" i think.

I went updates BS once and it was a bit of a hassle to find out all the variable names that have been changed in the LESS files.

Frank Lämmer
  • 2,165
  • 19
  • 26