News for hackers. Stuff that matters.
Re:Mobile-First CSS: Is It Time for a Rethink? by nojs on Sunday June 19, 2022 @06:30PM (#31804149)
Having done a lot of both ways, I am still a fan of mobile first. Otherwise inevitably the mobile site ends up being an afterthought, with retrofitted elements that almost but don’t quite work on mobile (often everything on the desktop page is just stacked, and it doesn’t quite work but it’s hard to put your finger on why). This rarely happens in reverse, because the default lazy desktop implementation is just that it’s “too simple” which is generally much less of a problem. It’s more obvious when something needs to be added than when it needs to be simplified or removed.
Re:Mobile-First CSS: Is It Time for a Rethink? by Vinnl on Monday June 20, 2022 @04:17AM (#31807631)
You can still write mobile-first; I think the idea here is mostly to no longer assume that all rules you write mobile-first will also apply to desktop. In other words, if you find yourself overwriting styles in a min-width media query for desktop, consider instead moving the rule you're overwriting into a max-width query, and then add a separate rule in the min-width query that just applies to desktop, if needed.