The best approach to customize Bootstrap Less files and keep it easy to be updated to future versions

Posted by user322896 on Stack Overflow See other posts from Stack Overflow or by user322896
Published on 2012-06-20T21:12:56Z Indexed on 2012/06/20 21:16 UTC
Read the original article Hit count: 135

Filed under:
|
|
|
|

I'm wondering what the best way would be to customize the less files in Bootstrap and, at the mean time, keep it easy to be updated to future Bootstrap versions.

It's straightforward to just modify the less files, but the problem is that when the next version of Bootstrap comes out, it might be painful to upgrade (because all the changes are already deeply mixed with the original sources.)

Another approach would be similar to the open closed principle, that is, keeping the original less files unchanged, and adding my customized less files to overwrite the CSS rules I need. When Bootstrap gets updated, (hopefully) I can simply replace the less files and everything would work magically. However, regardless of the correctness of my assumption, the same CSS rules would be scattered in even more places and hard to manage. Also, the more we overwrite the CSS (not for compatibility or other purposes), the more bandwidth we waste.

I know this highly depends on how the author of Bootstrap would handle the structure of the framework or even the naming of CSS rules, but I'd still like to hear everybody's opinions.

Thanks.

© Stack Overflow or respective owner

Related posts about css

Related posts about Web