The pros and cons of CSS frameworks for RWD
With RWD as our main driver for any decisions we make in terms of layout versus screen real estate, let's take a look at what the good and not so good things are about CSS frameworks:
The advantages are as follows:
- They are very useful to rapidly build responsive prototypes rather than showing static wireframes.
- Cross-browser issues are already taken care of.
- They force you, in a good way, to create grid-based layouts.
- They offer a solid starting point to build on top of.
- The modularity allows you to handpick the components you want. For example, you can just use the CSS grid module or you can use the
forms module. - Changing the styling to fit your design(s) is relatively easy.
- If you aren't too good at CSS, you can still use a CSS framework to implement your own designs.
The disadvantages are as follows:
- They can bloat your project(s) with CSS that you will never use.
- They have a large footprint if you decide to use the entire CSS framework.
- You might need to change your habits and the way you write your HTML and CSS to fit the CSS framework you're using.
- They can be opinionated, so if you don't like the way things are named you have very little choice for customization.
- Customizing a CSS framework is doable, but it can be very time consuming and dangerous. Change a name to something else and there's almost no way to know what the impact is going to be on other parts of the framework.
- If the default styling is not changed to fit your brand/designs, your site or app will not be unique and will look like everyone else's, losing credibility in front of users.
- If you need to build something simple, using a CSS framework is overkill.
- Every website/app or project is different, so you may end up spending a lot of time changing and overriding properties for every single project.
- They try to solve every frontend problem.
Now that we've seen the pros and cons of CSS grids, CSS frameworks and UI kits it's time to make a decision and answer this question: which methodology is best for RWD?
The answer isn't the most encouraging, I admit it, but it's the truth: it depends.
If we're freelancing and doing everything ourselves, or working in a very small group, it may not be necessary to use any frameworks at all. We can custom build something based on the same principles major frameworks have been built on. Obviously, we would want to automate any repetitive processes so we use our time efficiently.
But if we're working in a large team, a melting pot of web professional with in-house and off-shore resources, maybe using a framework can be helpful. This is because everyone will need to adhere to the framework's structures so that all things are consistent.