• Sasha MSasha M, over 7 years ago

    I don't think refusing from bootstrap classes is great idea for everyone. When you work on front-end code alone, it's okay. But if there's a team of developers (not too familiar with css and sass) you work with, naming elements with custom classes causes a development slow-down — Bootstrap (as any other popular framework) is some kinda language that everyone understand.

    I usually name elements like .container.welcome-block-background — use bootstrap classes and my own classes that extend and redefine element appearance. Bootstrap-sass is built with !default flags, so redefining its styles is not a problem.

    0 points
  • Tim GauthierTim Gauthier, over 7 years ago

    I agree that you really should build your own classes etc instead of just dumping in the prebuilt bootstrap ones, and this is definitely what makes foundation shine (forcing you to build your own things). However I don't see how you can get away with NOT putting the grids in when you need to build rows and columns that are semi-generic and reused by your site generating content. Sure I could make the layout have 3 different class names that are all the same sets of grids, however I feel it makes more sense from an optimization and development standpoint to make things as generic as possible when required. I don't see the reason behind "make your css completely separate from your html so you can change everything later". I'm building a site now for now, if I need to rebuild all of the styling later, I will likely also need to change a lot of the HTML anyhow. Instead it should be "build in modules, so you can change out parts as you need in the future".

    0 points
  • Ryan DeBeasi, over 7 years ago (edited over 7 years ago )

    It's worth noting that this article refers to Boostrap 2.x. For the Bootstrap 3 equivalents, see this section of the docs: http://getbootstrap.com/css/#grid-less

    For an even more lightweight solution, check out Preboot. It's the "guts" of Bootstrap - the LESS mixins and variables - but nothing else. http://getpreboot.com/

    I think you can make arguments for and against including grid classes in HTML. I avoid using grid classes in general, but I think there are cases where they might make sense.

    Including the grid classes can be really handy for rapid prototyping. Grid classes are also useful if you have a bunch of widgets that the end user can display in multiple sizes - that is, the semantics are the same, and only the layout is different.

    0 points