In my years of experience designing and building responsive websites, I've found that in order to have a better view of the content and the messages, it's easier to visualize things with a desktop-first approach during the wireframe and design phases.
As we are able to see more content in a given layout with a desktop-first approach, it allows us to translate the hierarchy of the content that was provided to us into a layout that represents said hierarchy. Doing this in a small canvas of 320 pixel width is more difficult than it needs to be.
When you accomplish that hierarchy, it will remain the same on small-screen devices, and the only thing that changes is the layout.
Best practices recommend building mobile-first, but many web professionals don't really know why we build mobile-first in the first place. Pun intended.
So, let's clear it up. The reason we build mobile-first is because of three principles mentioned by Luke Wroblewski, the author who actually coined the term mobile-first in 2009. You will notice that none of those principles are related to HTML, CSS, and/or JavaScript. In other words, you don't build mobile-first because of any advantage with HTML, CSS, or JavaScript. For more information, visit http://www.lukew.com/ff/entry.asp?933.
Consider the following points:
Now that you have a final design, you now need to implement that design into HTML, CSS, and JavaScript. For this phase, you should use the mobile-first approach and take into account the three reasons we mentioned earlier:
In this chapter, we will cover the following topics:
Let's look at some terminology so that we're on the same page:
With the terminology clear, let's continue.
Some professionals, including me, recommend using more modern and efficient techniques to create visual assets in order to optimize the time spent during the process of wireframing and creating designs/comps. Techniques such as style tiles, mood boards, element collages, and atomic design differentiate themselves from traditional wireframing and designs/comps methodologies. They offer the opportunity to explore layouts and styles, independent of screen widths, technologies, and even content creation.
For the scope of this book, we are going to focus on how a few things of the traditional wireframing and designs/comps methodologies can still be harnessed while maximizing the use of our time in these initial stages of mastering Responsive Web Design (RWD) with HTML5 and CSS3.
The reason behind creating designs in a desktop-first view is simple: real estate (space).
As designers, we are required to reflect the hierarchy of the content in a visual way. To accomplish this, we use many design principles such as rhythm, proximity, whitespace, patterns, contrast, balance, grid, symmetry, and so on.
When the canvas on which we're creating a wireframe or design/comp is big enough to try different arrangements and layouts, we have the necessary flexibility to explore different ways that can represent the said content hierarchy.
For example, we're using a 12-column grid and the content we were provided with dictates the following content hierarchy:
With the preceding content hierarchy, we can immediately start picturing different layouts to convey this hierarchy:
With a wide canvas in our design/wireframing application, we can play with these different approaches and eventually end with a proposed layout that's sound and represents the content hierarchy as required by the business or stakeholders.
Creating a layout like this one with a mobile-first approach with a small canvas is practically impossible. The small real estate screen is incredibly restrictive and limited. But when things start to grow, we would need to make this exploration process each time we think of a specific breakpoint.
Once we have a layout defined that reflects the content hierarchy, we will be in a good spot because when that content is rearranged on smaller screens, no matter which widths, the hierarchy will remain intact.
Let's clarify a term first: implement means create an HTML mockup with CSS and, if necessary, JavaScript, based on a wireframe or design/comp.
The reasons mentioned at the beginning of this chapter are the answer to the question why implement with mobile-first? Remember: mobile is exploding (well, it already did), mobile forces you to focus and mobile extends your capabilities.
None of those reasons could be accomplished with a desktop-first implementation, except maybe (that's a huge maybe) the second premise.
Let's change gears and move on to a subject a bit more technical that will help us understand how Sass mixins can help us master RWD for the mobile-first and desktop-first methodologies.
So, let's recap. Use desktop-first to create your designs and wireframes. Having a large canvas allows us to explore different layouts and properly arrange the hierarchy of the content. When it's time to implement (create HTML mockups), use mobile-first.