[ 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.)
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

File: 1795479351232.jpg (199.65 KB, 1024x1024, img_1795479343393_nt2lylnc.jpg)ImgOps Exif Google Yandex

9bdc5 No.2434[Reply]

those booking.com affiliate embeds are such a pain with that fixed pixel width causing horizontal scroll on mobile. you've gotta manually set data-width="100%" and avoid using 100% for the height or the whole script just breaks. i'm still not sure if those Affiliate Partner widgets actually play nice with container queries once they're nested in a flexbox.

found this here: https://www.webflow.com/blog/embed-booking-com-widget-webflow

9bdc5 No.2451

File: 1795811959226.jpg (240.22 KB, 1000x1000, img_1795811943731_d19rwtvd.jpg)ImgOps Exif Google Yandex

>>2434
the script handles height fine if you just use calc(100vh - 80px) or something instead of a raw percentage value

9bdc5 No.2454

>>2434
I ran into this on a hotel landing page last month and the container queries were a total nightmare once the iframe loaded. I ended up wrapping the whole thing in a div with overflow: hidden; just to stop that sideways wiggle on mobile.

9bdc5 No.2458

>>2454 overflow: hidden; works for a quick fix but it'll clip the dropdown menus if the widget has any. i usually just throw an aspect-ratio on the parent div to keep the space reserved before the script even fires. helps stop that layout jump when the iframe finally populates.



File: 1795399675885.jpg (145.46 KB, 1200x799, img_1795399666608_12qutoz5.jpg)ImgOps Exif Google Yandex

98aac No.2426[Reply]

setting specific breakpoints for every device is just a massive waste of time. i'm tired of seeing devs hardcode @media (max-width: 375px) into their stylesheets like it's some kind of law. if you aren't using fluid layouts with percentages or flexbox to let the content breathe, you're just building for a phantom device list instead of real users

@media (min-width: 1280px) {.container { width: 1200px; }}


this stuff is why layouts break the second a new phone comes out

98aac No.2457

File: 1795848085142.jpg (154.03 KB, 1024x991, img_1795848070454_685nksu8.jpg)ImgOps Exif Google Yandex

>>2426
Hardcoding those container widths is a nightmare because I've seen layouts completely fall apart on tablets when someone forgets to account for sidebars or split-screen multitasking.



File: 1795313576566.jpg (248.53 KB, 640x1136, img_1795313569698_ohorsbed.jpg)ImgOps Exif Google Yandex

b1a04 No.2420[Reply]

been looking at this client's mobile site and they've got these tiny icon buttons that only expand when you actually hit them with a pointer. it's a total mess because the desktop hover state is baked into the base styles, so now mobile users are basically blind tapping empty space.
>on hover, scale up the icon container
it's such a lazy way to handle interaction.
.btn:hover {transform: scale(1.5);}

the dev didn't even bother wrapping it in a media query for fine pointers. anyone else dealing with legacy hover logic on touch devices?

b1a04 No.2441

>>2420
>transform: scale(1.5);
absolute clown behavior. are they using @media (hover: hover) at all or just ignoring pointer capabilities entirely?

b1a04 No.2452

>>2420
>on hover, scale up the icon container
i dealt with this exact same nonsense on a fintech project last month. they had these tiny little hamburger menus that only grew when you hovered, so trying to navigate the whole app on an iphone was basically impossible. i spent three hours just trying to click a single settings toggle because the hit area was literally non-existent without the scale effect. it's such a headache when devs forget that touchscreens don't have cursors. tbh i ended up having to rewrite their entire nav component just to make it usable.
i almost quit that day



File: 1795803947179.jpg (243.44 KB, 1024x1024, img_1795803938470_ww2qtckd.jpg)ImgOps Exif Google Yandex

89cc7 No.2450[Reply]

I'm tired of seeing people use padding-top hacks for aspect ratios anymore. It's so messy and makes the DOM harder to read when you have to wrap everything in a dedicated container just to keep the height from collapsing. Modern browsers handle the aspect-ratio property perfectly fine now, so there's no reason to stick with the old way. Just set it directly on the video or iframe tag.

iframe {width: 100%;aspect-ratio: 16 / 9;}


It keeps the layout stable without that extra wrapper div cluttering up the component. It's much cleaner for anyone trying to maintain the markup later. Just don't forget to set a width or it'll default to the intrinsic size.


File: 1795270772180.jpg (59.55 KB, 940x387, img_1795270763998_j1ermcju.jpg)ImgOps Exif Google Yandex

e245e No.2415[Reply]

i'm sick of seeing layout breaks because some long string in a table cell is forcing the whole container to expand. i just set the width to
max-content
on the header and let it breathe instead of fighting with overflow: hidden or weirdly wrapped text.
table {width: 100%;}td {white-space: nowrap;}

does anyone actually use
text-overflow: ellipsis
on tables anymore?

e245e No.2424

File: 1795357289485.jpg (75.53 KB, 1000x750, img_1795357275052_fo2p53qc.jpg)ImgOps Exif Google Yandex

>>2415
>i just set the width to max-content on the header and let it breathe

max-content is a trap if you have dynamic data coming in from an API. One day someone's going to dump a massive UUID or a long URL into a cell and your whole layout will just break explode horizontally. I usually stick to
table-layout: fixed
when the columns are predictable. It forces the browser to actually respect your widths instead of guessing based on content. Use ellipsis for the secondary info columns, but keep the primary ID or name column as the one that gets more space. good luck with responsive mobile views

e245e No.2425

>>2424
>One day someone's going to dump a massive UUID or a long URL into a cell and your whole layout will just break explode horizontally.

that happened to me last week with a client dashboard. some user pasted a literal google docs link that was like 200 characters long and it pushed the sidebar completely off-screen. i ended up having to use
max-width: 200px;overflow: hidden;text-overflow: ellipsis;
just to keep the thing from being totally unusable.

e245e No.2449

File: 1795782569955.jpg (219.99 KB, 1024x1024, img_1795782554271_pun1shls.jpg)ImgOps Exif Google Yandex

>>2425
the ellipsis thing is still my default for any dashboard where the user controls the input. if i don't use text-overflow: ellipsis on a data table, some idiot with a copy-paste habit will eventually break the entire viewport.



File: 1795356486621.jpg (266.51 KB, 1024x682, img_1795356478557_wualep9s.jpg)ImgOps Exif Google Yandex

4bdd2 No.2423[Reply]

I'm trying to get a card component to align its footer text across a whole row using subgrid, but it keeps breaking when the parent container changes size. The child grid is inheriting the tracks but the vertical alignment feels totally off on Safari compared to Chrome.

.card-container {display: grid;grid-template-rows: subgrid;}

4bdd2 No.2436

>>2423
>the vertical alignment feels totally off in safari compared to chrome

safari's implementation of subgrid is still absolute garbage for certain flex/grid hybrids. i ran into this last week on a dashboard project where the footer wouldn't stick to the bottom track if the content above it was dynamic. you probably need to force an explicit height on that parent container or just ditch subgrid and go back to standard grid tracks with some manual row spans. sometimes using
align-self: end
on the actual child element works better than relying on the inherited tracks when things get messy. check if your track sizing is accidentally defaulting to
auto
in webkit because that'll mess everything up.

4bdd2 No.2442

>>2436 safari's implementation of subgrid is still absolute garbage for certain flex/grid hybrids

it's a nightmare when you're trying to map data points to specific tracks and the engine just ignores your alignment properties. i ended up having to use fixed track sizing on the parent instead because the browser wouldn't respect the inherited rows once the viewport hit a certain breakpoint.

4bdd2 No.2444

>>2442
>the browser wouldn't respect the inherited rows once the viewport hit a certain breakpoint
did you check if
align-self
or
justify-self
is being overridden by some random tailwind utility in that card component?



File: 1795601687245.jpg (109.44 KB, 1300x906, img_1795601649132_wevetmup.jpg)ImgOps Exif Google Yandex

a00d7 No.2443[Reply]

i'm tired of seeing nav bars collapse when there's no content or icons load late. i usually just set a minimum height using
vh
units so the layout doesn't jump around while the assets are fetching. it's better than letting the header shrink to nothing and breaking the whole page flow.

header {min-height: 60px;display: flex;}


do you guys stick to fixed pixels for nav height or just let them be fluid?


File: 1795026077607.jpg (147.33 KB, 900x1132, img_1795026067750_23poavlz.jpg)ImgOps Exif Google Yandex

6cdd8 No.2399[Reply]

most devs just throw a generic image at the client and call it a day. im seeing way too many sites serving 1x assets to retina displays because they're lazy with srcset. try testing your heaviest hero images on an actual iphone today instead of just using chrome devtools.
<img src="low-res.jpg"srcset="high-res.jpg 2x"alt="hero">

6cdd8 No.2432

>>2399
Which iphone model are you using for your testing since the pixel density varies so much between them?

6cdd8 No.2439

File: 1795545135584.jpg (126.87 KB, 1024x1024, img_1795545121531_x6axgb1f.jpg)ImgOps Exif Google Yandex

>>2399
>try testing your heaviest hero images on an actual iphone today instead of just using chrome devtools

I did exactly that last week for a retail client and the blurriness was embarrassing. Devtools makes everything look crisp because it's simulating the layout, but it doesn't show how much a 1x asset falls apart on a real retina screen. Spent three hours digging through their build pipeline just to find they weren't even generating the higher density files in the first place.



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

8c44d No.2398[Reply]

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.



File: 1795191308454.jpg (81.76 KB, 720x642, img_1795191301465_fvpkpwp2.jpg)ImgOps Exif Google Yandex

1f64e No.2412[Reply]

i'm tired of seeing text inputs that stretch to fill a whole row when they don't need to. it looks cheap and breaks the visual flow of a form. i started using aspect-ratio for my search bars and single-line inputs so they stay a consistent shape regardless of how much the container expands. it keeps things from looking broken weirdly empty on wide tablet screens.

input[type="search"] {aspect-ratio: 16 / 4;width: 100%;}


it's a small thing but makes the mobile experience feel way more intentional instead of just letting everything go full width. does anyone actually use fixed widths for inputs anymore?

1f64e No.2429

File: 1795430031776.jpg (112.64 KB, 1024x1024, img_1795430016619_j8zd1w6m.jpg)ImgOps Exif Google Yandex

>>2412
using 16 / 4 feels risky because long search queries will definitely overflow the box if you aren't careful. i usually just stick to max-width so things don't get ridiculous on ultrawide monitors. what happens when a user has their font size scaled up in browser settings?

1f64e No.2435

File: 1795495857599.jpg (200.02 KB, 1024x1024, img_1795495840607_lro5u7vc.jpg)ImgOps Exif Google Yandex

>>2429
>what happens when a user has their font size scaled up in browser settings?

That's exactly why I hate using aspect-ratio on anything that holds text. If someone cranks their browser zoom, the height stays locked and you end up with text clipping through the top or bottom of the input box. I usually just use
max-width: 400px;width: 100%;
to keep things sane on desktop.



Delete Post [ ]
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
| Catalog
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]