7 ms·
> One part of a solution to this problem is to use relative CSS units. Avoid hard breakpoints whenever possible. This is what "responsive design" used to mean.
by Izkata 6y ago
> One part of a solution to this problem is to use relative CSS units. Avoid hard breakpoints whenever possible.
This is what "responsive design" used to mean. I remember being quite confused when people started using it to refer to distinct, non-responsive mobile-vs-desktop views.
- tgv 6y agoI guess that's bootstrap's legacy: they implemented a grid in precisely that annoying way. Not that you have to use it like that, but the temptation seems to be considerable.
- andrewingram 6y agoYeah, the advent of CSS frameworks introduced the concept of a relatively small number of global breakpoints. The consequence of this was that at certain widths, typically some figure meant to represent a change on form factor (mobile, tablet, laptop, desktop), there'd be dramatic layout shifts. For a long time I resisted this, opting instead for more surgical introduction of a breakpoint, literally at the _point_ where some part of a page's design _breaks_ (not really the etymology of the word, but it's fun to think of it this way). But it's felt like a decade-long battle against the momentum of the industry, and sometimes I just want to build things rather than fight.
- molf 6y agoI agree with you in principle. But having many different breakpoints that are accurately defined at exact widths leads to one huge practical downside: the number of possible combinations of website element versions skyrockets. I have found this to quickly lead to a situation where it is no longer practical to test all combinations. A small number of global breakpoints can be a better trade-off when it means the website works better (for most people).
- andrewingram 6y agoI think you're definitely right. It's possible that container queries may open up new possibilities that resolve the tension between the two approaches.
- eurasiantiger 6y agoOr, you know, use CSS Grid.
- andrewingram 6y agoThis feels a little snarky, and somewhat tangential. I've been using CSS Grid for years as my default layout method, but it doesn't magically solve all issues.
- eurasiantiger 6y agoIt pretty much does, though. It’s just the syntax is horrible.
- Zardoz84 6y agoLooks that approach it would be a hell to maintain. In special if it's a big web app. I prefer having a few fixed well defined breakpoints that having a combination explosion of places to fix and widths that I have to control when I do a changed on a component.
- chipotle_coyote 6y agoYeah, that was confusing to me, too. I saw the article's first example and thought, "Well, that's not really responsive design, that's switching between two entirely different views!" On my personal site I do indeed have a media query to make some tweaks when the viewport is phone-in-portrait-orientation narrow, but I try to keep them pretty minimal. I find sites that reorganize themselves at different widths ("if your browser window is 2000px across, this is a three-column display instead of two!") to be…not necessarily bad, but at best, unnecessarily clever.
- resonantjacket5 6y agoIt's not strictly defined but usually I've heard serving distinct mobile web pages (or layouts) as adaptive design
- pdonis 6y ago> This is what "responsive design" used to mean. I remember being quite confused when people started using it to refer to distinct, non-responsive mobile-vs-desktop views. I agree this is confusing, but I think we still need a term for distinct types of views. The point of the article is that, once a user has started using one particular view, it shouldn't suddenly change to a completely different view with a different layout just because the user's browser window got resized by a few pixels. I don't think it's possible for an app to auto-detect which view the user wants to use, particularly not if the auto-detection logic allows changing views on the fly in the middle of a user session based on resizing the browser window. I think the only real solution is to have different views that each have their own distinct URL, so the user can choose which view to use. Each view can then be "responsive" within the general constraints of the layout it adopts.
- deleted 6y ago[deleted]
- true_religion 6y agoI have heard that called adaptive design.