[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1794989337475.jpg (132.16 KB, 733x1100, img_1794989328819_qtx0i8vo.jpg)ImgOps Exif Google Yandex

8c44d No.2398

been seeing too many people starting with desktop styles and trying to strip things away for mobile. it's a nightmare headache when you're fighting specificity just to hide a massive sidebar on a phone. i prefer building the mobile layout by default and only adding complexity as the screen gets wider. you basically just wrap your desktop-only stuff in a min-width block so it doesn't even touch the small screens.

@media (min-width: 768px) {.sidebar {display: block;}.main-content {margin-left: 250px;}}


it keeps the base stylesheet extremely lightweight for actual mobile devices. if you're working on a project that's already stuck in max-width mode, i get why you'd stick with it but switching to min-width is cleaner long term. do you guys actually bother refactoring old max-width sites or do you just patch them?

8c44d No.2407

File: 1795128315787.jpg (99.12 KB, 1300x940, img_1795128300685_9gqlet5f.jpg)ImgOps Exif Google Yandex

I just patch them. Refactoring a legacy site with half-baked max-width queries sounds like a __total waste of time_

8c44d No.2416

>>2407
patching is all anyone does because touching a legacy codebase is suicidal. i tried refactoring one last month and ended up fighting
!important
flags for three days straight. the mobile styles were basically just a graveyard of
display: none
overrides that broke everything once you hit a tablet breakpoint. if you're stuck in max-width hell, just keep your head down and write more specific selectors. i'd rather deal with bloated css than spend a week untangling a spaghetti mess of media queries. tbh it's easier to just add a new class than try to fix the old one

8c44d No.2438

>>2407
I used to think that way too until I inherited a massive e-commerce build that was entirely max-width based. It was a mess of overrides and the layout would literally jump around as you resized the window because the mobile styles were fighting the desktop defaults. I spent two weeks trying to untangle it instead of just patching, and it turned into a complete disaster. By the time I got the base styles stable, I had basically rewritten half the component library anyway. If the technical debt is small, patching makes sense, but if you're stuck in that cycle for months, you might as well go mobile-first from the jump. It's much easier to build up than it is to tear down.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]