- Do Consider Your Content
- Don't Give Mobile Users the "Mobile Treatment"
- Do Serve Correct Assets
- Don't Serve Everything to Everyone
- Do Go Mobile First with CSS
- Don't Add Every Resolution as a Breakpoint
- Do Go Fluid, Fixed, or Mixed
- Don't Use a Framework if You Don't Need One
- Do Analyze and Optimize
- Don't Ignore Your Users
Don’t Use a Framework if You Don’t Need One
You have probably heard of at least one framework that promises doing almost everything you want with little to no impact on your project. Depending on your team, you have probably even used a framework or two to create prototypes that show off your idea, style guide, or even as a production product. Frameworks are excellent tools that can speed up development time and still give you the flexibility you need with your design. Including a framework becomes problematic if you do so because you were told it was epic but only use a small fraction of what that framework can do.
If you include a framework that includes a grid system, a slider widget, a menu widget, an off-screen navigation widget, a responsive image solution, a modal window widget, and a kitchen sink in your design but then only use the slider widget, you did not need to include that framework. It may not seem like a big deal. It may only come down to less than 100KB; the problem will come from maintenance.
Let’s pretend that you decided to use a fancy and popular framework that we will call “shoeclip.” This framework has everything you need, you’ve heard about it at conferences, and every one you know is praising it. When you open up the styles to modify a few breakpoints you find that it includes a series of stylesheets that all include breakpoints that are preset to help you with your site. You then notice that only a few of them line up with your design, and what’s worse, some of them are nested, making you trace back through the logic of how they are called and when. In the end, you end up with a site that has more than 20 different breakpoints and your design still seems to go wonky at a few random sizes.
Frameworks are great, but really should be used only when needed.