Mobile-First CSS: Is It Time for a Rethink?

The mobile-first style approach is great—it focuses on what really matters to the consumer, it’s well-practiced, and it’s been a popular style design for years. But developing your CSS mobile-first should also be fantastic, too…right?

Well, not necessarily. Classic mobile-first CSS development is based on the principle of overwriting style declarations: you begin your CSS with default style declarations, and overwrite and/or add new styles as you add breakpoints with min-width media queries for larger viewports (for a good overview see “What is Mobile First CSS and Why Does It Rock?”). But all those exceptions create complexity and inefficiency, which in turn can lead to an increased testing effort and a code base that’s harder to maintain. Admit it—how many of us willingly want that?

Mobile-first CSS may yet be the best option for your own tasks, but you need to first determine whether it is appropriate in light of the physical design and user interactions you’re creating. To help you get started, here’s how I go about tackling the elements you need to watch for, and I’ll discuss some alternative remedies if mobile-first doesn’t seem to fit your job.

Benefits of mobile-first

Some of the points to enjoy with mobile-first CSS growth —and why it’s been the de facto growth strategy for thus long—make a lot of feeling:

Development pyramid. One thing you definitely get from mobile-first is a great development hierarchy—you only focus on the cellular view and get developing.

Tried and tested. It’s a tried-and-true method that has worked for years because it solves a problem actually also.

Prioritizes the smart see. The smart see is the simplest and arguably the most significant because it covers all of the crucial consumer journeys and frequently accounts for more user visits ( depending on the project ) in terms of complexity.

Inhibits desktop-centric growth. It can be tempting to first focus on the desktop perspective because desktop computers are used for growth. No one wants to spend their time retrofitting a desktop-centric website to work on mobile devices, but thinking about mobile right away keeps us from getting stuck later on!

Disadvantages of mobile-first