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

Utku Turna
Utku Turna
15,090 Points

For Wordpress "Use a CSS Framework" or "Build One" ?

Hi All,

I am a fronrend developer at my company. I am still strugling with that question in my head. I write tons of css for custom project and for our custom cms. Now we use wordpress sometimes and edit some premium themes for our customers.

I want to build a wordpress theme so we can use it in most of our project. I cant decide if

1- Use a framework Bootstrap, Foundation etc. 2- Build your own framework from scratch 3- Take some parts of that frameworks and build a hybrid with your code.

Frameworks like bootstrap contain too many unused codes in my projects. Apart from that they are neat and clean. But i think i can edit my own code much easily if i write myself. What do you think about it ? Would you use a good framework or build one to use as a base in all of your projects ?

Thanks

3 Answers

Kevin Korte
Kevin Korte
28,149 Points

The only reason to use a framework in my opinion is they cast a large net of browser support and best practices for most situations. The downside, as you said is the bloat.

If you can write your own framework for your own project that's as lean as it can be, and is a sound framework, that's even better in my book!

The exception might be where you are building themes for sale. You might be doing your purchaser a favor by using a framework, as it would be easier for them to buy your theme, and higher a dev to modify the theme if you used bootstrap, and that dev is familiar with bootstrap, for instance.

At that point, someone buying a theme for a wordpress site isn't concerned with performance enough that bootstrap or foundation is too bloated for them, let's be honest here.

Roy Penrod
Roy Penrod
19,810 Points

Hey, Kevin ...

Do you know of any lightweight frameworks with solid browser support build in?

Utku Turna
Utku Turna
15,090 Points

Yeah you are right. I mean maybe it will be a little bloat but if you learn how to use it correctly and optimize it as you can for your need it's quite good actually. So you are saying there is no need to discover america again :) If they are already using the best practices that is quite logical. What i was wondering about I'm writing html, css, js for years now is it too hard for me to build my own small framework as effective as bootstrap in some projects with just the pieces i need to use.

As for wordpress in my company we mainly finish and deliver the whole project than maybe in some time little addons and stuff. So each time i am redoing a revised version on another theme's files, PHP, CSS, JS etc. I want to build my own logic and understanding so i can play around with it.

I guess i had to practice a few like Bootstrap, Foundation maybe than decide which cover my needs.

Kevin Korte
Kevin Korte
28,149 Points

Hey Roy,

My fravorite lightweight frameworks are

  1. http://purecss.io/
  2. http://getskeleton.com/

Depends on what the project needs. Hope that helps you.

Roy Penrod
Roy Penrod
19,810 Points

I'm working on a Bootstrap project for my portfolio right now because a local company lists it in their job description, but the truth is I don't like it.

I like to keep my style separate from the markup and Bootstrap makes me cringe every time I see classes like "text-center".

It really comes down to what you guys want and how much time you have to work on it. If you think your own custom framework will work best, go with it. You'll know it like the back of your hand and can grow it as you develop future projects with it.

Kevin Korte
Kevin Korte
28,149 Points

Sass it, or Less it? You can use Sass or Less to apply bootstrap's presentation class markup to whatever structural markup you want.

The problem here is even still more bloat if not done correctly.

Jake Lundberg
Jake Lundberg
13,965 Points

I'm with Roy on this one. I personally prefer to write my own CSS instead of using frameworks like bootstrap. It's just one more thing you have to figure out, and as you mentioned in your initial post, frameworks come with a lot of stuff that you don't use, but you are still downloading everything included in it. I say build your own, or go with the hybrid. You can take just what you need from other resources, and then build on top of that yourself.