

For the uninitiated, responsive web design is the way that we enable a single layout to work for anything that can use the web. Ethan Marcotte’s simple recipe of fluid grids, fluid images, and media queries (from way back in 2010 and the following book) spurred us as creators of the web to really consider how we use space across many device types. Luke Wroblewski’s ‘mobile first’ became common parlance for starting with a smaller implementation and scaling up for larger screens.
From that, fluid typography, the <picture> element, and all kinds of more flexible ways of presenting our work have evolved. CSS itself has brought forth flexbox and grid which means we can do away with elaborate hacks and have a real sense of control over sometimes quite complex layouts in a way that we never have before. All these years later we still have a difference that can make working in this responsive way difficult: the web is innately fluid but design tools are not.
As great as componentization (the grouping of UI elements in a discrete package) is in some tools, along with some great layout options that allow for flexibility now, we still have a mismatch between the static artboards or frames we design with and the more fluid and dynamic nature of a web browser. These things are not the same. It’s this space where as great as design tools are, we don’t have parity with the abilities of the platform we’re designing for so there is still an element of translation.

This difference between design tools and the browser we’re designing for can lead to a few problems, the first being deciding on how we describe change in our layouts. In CSS we use media queries to describe when we want to step in and design a change. These breakpoints (values we use with media queries) that we code with can themselves be divisive: while they are capable of doing many things these days, we typically refer to the width of the viewport…the part of your browser that renders a website. Because of this, the language we use becomes a bit flaky; going by viewport width alone means being narrow means it might be a mobile, being wider might be a tablet and being wider still might mean it’s a desktop. What is important to note is that it’s no more than circumstantial, a viewport of a given width tends to be found on this kind of device but not exclusively. You change the orientation of your phone and going by viewport width it would be reported potentially as being in a ‘tablet-type’ size unless we also check for orientation. Likewise, we can’t make assumptions about input types; whether something is touch-based or not purely by viewport width alone. Device detection itself isn’t a great tool either - the question we need to ask ourselves is if the user’s browser or device is capable of X, how would that change our design? Much of the time making these things our default can make a site or app better for everyone. For example, assuming that it’s possible a user may have touch capabilities and so having larger hit areas will work for everyone, attempting to make a change based on whether it appears the user’s device has touch interaction may be unnecessary overhead and not actually be good for the user.
In our design tools, we need some measures to work with; some size of artboard or frame to design on. Without real-world constraints, we can say a space of 320px wide is ‘mobile’ and most people would understand the implications of a device like that. This is where I’ve always had an issue with device-based breakpoints - they’re circumstantial at best and don’t allow us to get the most out of the space we have for whatever device you use. One of the main issues is that our design tools don’t work in the same way as the canvas we code for: the browser. Because this is the web and not a native app, having a narrow viewport does not mean it is a mobile device, just that it may be as being wider doesn’t mean we’re targeting tablets or desktop devices, just that the viewport is wider. With snap mode on Windows and multitasking on iPadOS we have a great real-world example of how the width of viewport doesn’t correlate to a specific device type or interaction model.
You might often hear people speak critically of resizing the browser window when working responsively as that not being a behavior your users would do...but that test gives us confidence that whatever viewport they're using, our layout should be appropriate. In this way, we don't need to know a specific measure for a given device (though at a bug-fix or minor improvement level this can be handy), we have a working assumption from whatever we define as a narrow viewport to the widest our designs should support, it should work well no matter what you use. New devices with varying dimensions are released relatively frequently and in theory should just need to be validated with our responsive approach with the potential for relatively minor tweaks.
Like most design decisions we make with design systems, a responsive strategy is something that can be baked into all of your components through design tokens and is something that can be done with intent and a clear purpose. If using device-based breakpoints is the right strategy for you, it’s worth being clear on why that is and being more deliberate with it rather than any unclear assumption that it’s just the way things are done. Even following approximate device measurements, other breakpoints are often helpful to get a great result for the user. Sometimes a hierarchy of breakpoints can emerge to cover these in-between times we can step in to improve a layout.
Another option may be having breakpoints that perform a function for your layouts like when you go from linear content in a narrow viewport into two columns, or three as the available space increases. These add a place to describe change when the content needs that support, making use of the innate fluidity of the web. This also creates fewer layout dependencies as components may need to change because of a deliberate layout shift but otherwise should just consider if they’re making the best use of space given the available real-estate available to them.
The final option may be having no ‘global’ breakpoints and allowing components to evolve and change as and when they need to - breakpoints used to describe a deliberate change on a specific component. In this case, we may have many breakpoints, none of them centrally held and all encapsulated within the component itself. Add breakpoints when the content would get value some intervention.

Whichever option is a fit for you can have knock-on effects as this should help us to think more clearly about how this should work at a system level. What responsibilities should be held or described where? Using design tokens could give us huge amounts of power for something like this but need to be mindful of what we’re doing with them. We could store a value for what we consider to be ‘mobile’ or ‘2 columns’ but how is that executed? If we’re clear the system is only ever for a website we could describe it in terms of what can be used within a media query; if the system needs to work for native apps of some kinds, describing these layout changes will need to be more agnostic. These apps can very much have intent over what device should use what layout and so are a better fit for our design tools.
Without giving a primer into design tokens here, this may mean each value is actually a composite token: a design token with a single name that holds many values. While coding ‘mobile first’ we start from very narrow viewports and cascade changes upwards, media queries can do so much more. They can now give us, amongst other things:
We also tend to rely purely on a max-width value for our media queries when creating mobile first though we've long had the ability to create ranges between two values or nest queries to give greater context. You might do this when describing print style overrides or to negate or reduce the motion shown to the user if they've expressed a preference.
So in reality, for many responsive layouts, we don’t take advantage of much of the power that’s available to us. Maybe that’s habit? Being tools in our toolkit for working on the web, these aspects and many others are available to help us make something that works well for our users, no matter what they use. Often they can be relatively small fixes such as using viewport width as the main gauge of viewport space, considering the orientation. Perhaps if the user is using a device at a given width in landscape, we may want to reduce some spacing around the hero/heading of our layout.
As from media queries, we also have a great range of options to work with the fluid nature of the web that can be applied to give us fluid/responsive typography as well as layout tools such as flexbox and CSS Grid. All of this power on the front end can illustrate the increasing gap with the design tools we use as most often these things can’t be replicated in them. Not using the viewport as a canvas and using a proxy by way of artboards/frames, etc gives us the challenge not just of designers needing to use their imagination but that it relies on great communication and collaboration where our tooling might fall short.
As if responsive design didn’t give us enough to think about, there’s the potential for more fun and complexity with something called Container Queries. The idea has been around for many years; the concept of referring to an element’s parent or containing element to determine its responsive behavior. That gives us the option of whether a component should refer to the viewport as we do now or the element it’s within.
While the spec for this becoming common functionality is currently still in its early stages, for now, it’s an interesting way of challenging the way we think about how our components evolve to use whatever space may be available.
Tying a component’s layout to its available space from its container over the current viewport dimensions gives us some freedom and complexity. It may not always be that the wider the viewport, the wider the parent container is for our component; for example, there may be a point where your layout goes to two columns. The viewport is wider but the component is now housed in a column within the layout.
The thought process behind how we think about layout composition is interesting here because we can think about components existing and evolving independently of a fully designed layout. We can consider a component using space in much the same way as we do today with responsive design but with a greater awareness of both width and height. Placing it within a layout context can then give us the ability to consider whether referring to the viewport gives us useful context to inform our component’s presentation. Does the fact that it’s in a container of X width and in a viewport of Y width give us information that can help us to improve our design?
As this functionality is finding its way into browsers (see caniuse.com for current adoption), this gives us a chance to experiment and play. Getting our heads around what is becoming available can make us reflect on our current responsive practices and consider the evolution of components in and out of their use cases.

There’s a lot to digest as we fall down the rabbit hole of responsive strategies and explore the potential of container queries. Looking ahead, we have the potential of this in and out of context-independent evolution of components, making our layouts truly a system of components rather than a fixed designed canvas of old.
When it comes to design systems, this poses us with some challenges (as if we needed more!). We can use design systems to provide a sense of consistency across components and layouts but perhaps in this space, the word coherence might be more appropriate. The connotations of the word consistency can be that it’s too strict and doesn’t allow for deviation. In a world of more fluidity and components evolving in increasing ways, we might grapple with how much control we should or shouldn’t exert over the components and composed layouts.
From our design tokens, we can simply capture a few global breakpoints; maybe you have these based roughly on device measurements. The direction of travel appears to be around something more nuanced and encourages us to think differently. What information in the browser helps us to make good design decisions and ultimately great interfaces for our users?

Back at the beginning of the article, I touched upon the tension between how design tools work and the way the browser works. Some design tools are doing a pretty good job of allowing us to play around with the layout of a component. Do they need to improve how they can mirror what the web is capable of doing in regards to responsive design and container queries or will there always be some kind of translation needed between our designs and code? There are tools out there that allow us to design with an actual coded component and maybe that’s one route for future development. We also need to preserve that sense of play and exploration as not every design is intended for production use.
For today, pausing and discussing what a responsive design strategy is for your design system and documenting those decisions is a solid starting point. Whatever the shape of that, making these choices more deliberately and questioning them is a healthy kind of conversation to have as a team. As with many of these choices, sparing a thought for what change might mean if there’s a need or desire to change it later on, builds in that robustness to your system.
