Hacker News new | ask | show | jobs
by seferphier 4771 days ago
I am a new to css / html. Can you explain to me why it is painful to deviate from their styles?
1 comments

A good example is going to be the upgrade process from 2.x to 3.x.

If you have been developing your site with Bootstrap to-date, then you've very likely been using their style classes throughout. For example, if you setup a grid on a page, perhaps you did something like this:

  <div id="home" class="row">
    <div id="content" class="span10">&nbsp;</div>
    <div id="sidebar" class="span2">&nbsp;</div>
  </div>
But with Bootstrap 3.x you'll need to change every instance of span* with col-span-*. Wouldn't it be nice if, instead of changing all of your templates, you could simply modify the LESS/CSS files using mixins?

Upgrading is just one example, another example is attempting to use Bootstrap to style an existing application where you do not have the ability (or only a limited ability) to change the HTML, but only the ability to inject a CSS "theme".