Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

When and how do you use bootstrap?

Those of you that use bootstrap, how are you doing so?

I am not a huge fan of any of the CSS frameworks in general since I don't like the throwing in the kitchen sink approach. It's not even faster for me right now since I'm not familiar with all the classes. I can see that with some practice it might be a cool way to do browser prototyping, but then to move to a lean mean production site you'd need to cut the fat somehow or just redo the CSS (which seems wasteful).

What's your approach, and if you're using it on production sites how are you reducing bloat in your stylesheets?

3 Answers

Ioana Rusu
Ioana Rusu
9,599 Points

Hi justdave,

I am a newbie in this world and I must tell you, i like bootstrap. I do not know all the classes in CSS but I am developing now my 2nd practice project with this framework and I must say it is easier. My 1st project was a simple webpage and I have used flex-box and I have struggled with the responsive part. In this 2nd project, I have a gallery, in 2 minutes it was there and it is responsive. It is true if you want your website to look different you need to add some CSS to ... 'refine' it but I can assure you I had more css in my 1st project than in the 2nd one so far. It is up to you if you want to use it or not and Guil said in his Bootstrap basic course that you can obtain a beautiful product in less time. It may seem that bootstrap gives you everything and you don't need to research but for me wasn't like this.

Hope this helped :) Happy coding !

Mark Wilkowske
PLUS
Mark Wilkowske
Courses Plus Student 18,131 Points

Bootstrap, by itself, is for rapidly prototyping a mobile-first responsive site. A site can be 100% responsive and I suppose one could be 100% Bootstrap but this latest responsive framework we bought was for the vendor's UI, JS and dashboard elements. It is probably 60%-40% Bootstrap/vendor. We don't use LESS or SASS and make all changes in the override file.

Coding withing the framework and even writing custom selectors shouldn't lead to bloat and I've found that bloat is a symptom with respect to the areas of knowledge or communication within the team. You're doing good if the style sheet is minified for production. It was helpful that we had a 1 month project a year ago on optimizing CSS because that led to improvements we could and did make.

How do you guys deal with trimming unused styles from the stylesheet though? Even minified it's pretty chunky.