Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you compile Bootstrap from its LESS files you can pick and choose which parts you include.

Also means you can override a lot of the default mixins fairly simply.



Is there a Dummies Guide to customising bootstrap (literally or figuratively)

I would rather not waste the time experimenting these days


It's not quite a guide, but you can customize what to include, and make tweaks to fonts, spacing and the like, directly on the bootstrap site:

http://twitter.github.io/bootstrap/2.3.2/customize.html

It's fairly self-explanatory, and the resulting file will contain only the code you actually use, making for smaller file sizes.


Step 1 - Exclude the .less and .js files that you will not be using.

Step 2 - Edit or override the variable.less file.

Done


I suspect the answer is read the source, but

A) how do I know what bits I will not be using B) how do the JS and LeSS files interact (can I leave out the JS as easily as the less?)


It's done intelligently, so you don't use tables, then you leave out tables.less. If you don't want tabs, then you leave out tabs.js.


Also the chrome dev tools has an "Audits" tab which will reveal unused CSS rules. It's not perfect, but it gives you a good idea.


That's good to know, thankyou. But I think for now I will stick with what I've got.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: