The question is similar to this one: How to use bootstrap-theme.css with bootstrap 3? but not a duplicate. I'm interacting with Bootstrap at .less level and recompiling it every time I make a change.
As I say, I'm developing a Bootstrap theme with less
. I'm editing bits here, changing variables there. Cutting out unused components. Putting most of my new CSS into /less/theme.less
. At the end of it, I'm left with two css files: /dist/css/bootstrap.css
and /dist/css/bootstrap-theme
(Oh okay, yes... and their .min.css
counterparts, you pedantic knowitall)
What is the point of splitting this output into two separate files? They've both deviated from the "stock" settings (just altering less/variables.less
will do that) so isn't this a duplication of effort? Isn't this the extra request that we (developers who think they know best) are constantly telling juniors should be avoided at any cost?
When developing custom Bootstrap themes, these are my options:
- Ditch the included
theme.less
and include my alterations in the main Bootstrap build, - Alter nothing in the core bootstrap build and override things in my
theme.less
, - Continue what I'm doing, altering both and using two CSS files.
What should I do and why?
On a related note, should I not be building Bootstrap from the files that you get if you click Download Bootstrap? In hindsight these seem to be geared toward building out the Bootstrap documentation (there's a ton of Jekyll nonsense in there that I just ditch). Is there a "clean" version of Bootstrap that is for people wanting to customise Bootstrap without the documentation?