[ 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: 1791831632722.jpg (146.46 KB, 1024x1024, img_1791831623904_nre1gsrd.jpg)ImgOps Exif Google Yandex

326e2 No.2212[Reply]

trying to fix that weirdly stretched logo look on mobile. using object fit cover is fine until the crop cuts off the actual brand name. switching back to aspect ratio on the img tag handles it way better without extra wrapper divs. tbh just use the property and stop overcomplicating things with container hacks

326e2 No.2215

File: 1791861545687.jpg (273.51 KB, 1024x1024, img_1791861531601_p0s6lldm.jpg)ImgOps Exif Google Yandex

>>2212
spent three hours on a client dashboard last week fighting with padding-top hacks only to realize i could've just used aspect-ratio. my brain is basically a pile of spaghetti at this point.

326e2 No.2236

>>2215
>spent three hours on a client dashboard last week fighting with padding-top hacks

The padding hack is actually still safer for when you need to support older browsers that don't recognize aspect-ratio properly. Just use the old way if you're working on a legacy codebase and don't want to break the layout for anyone.



File: 1791745220320.jpg (95.38 KB, 1024x1024, img_1791745213367_3w5bslbh.jpg)ImgOps Exif Google Yandex

71909 No.2207[Reply]

stop using media queries for every single font size change. use clamp to let the text scale between a min and max value so you don't have to manage fifty different breakpoints for typography.

font-size: clamp(1rem, 5vw, 2.5rem);


tbh it makes the fluid stuff way easier than manual overrides

71909 No.2208

File: 1791776018232.jpg (126.83 KB, 1024x1024, img_1791776002474_ao77up5a.jpg)ImgOps Exif Google Yandex

>>2207
the 5vw part always feels too aggressive for me on huge monitors. how did you decide on that specific viewport multiplier?

71909 No.2228

>>2208
I ran into that same issue on a 4k display last week. Did you use any calc() math to keep the scaling more predictable or just eyeball it?

71909 No.2235

File: 1792192928686.jpg (310.39 KB, 1024x1024, img_1792192912173_3ph6gjr2.jpg)ImgOps Exif Google Yandex

>>2228
i usually just eyeball it too until i realize the accessibility is getting weirdly wonky on small screens, but i've found that adding a little bit of rem to the middle value helps keep things more grounded than just using pure viewport units. i hate when text becomes unreadable because someone forgot about zoom settings, so i try to make sure there's enough fixed weight in there to prevent that aggressive massive scaling on ultra-wide monitors. do you find yourself sticking to a specific ratio for your line heights when you use this?



File: 1792192523161.jpg (131.64 KB, 1024x1024, img_1792192513883_j8ttlxwt.jpg)ImgOps Exif Google Yandex

c6a7e No.2234[Reply]

i'm losing my mind with this line-height on mobile. i tried using a media query to tighten up the tracking for small screens so the text doesn't look like it's falling apart, but now the descenders are hitting the line below. it looks messy and totally unpolished. i even tried adjusting the letter-spacing via a clamp function but that just makes the kerning feel all wonky on larger tablets. it's fine unbearable when the rhythm is off like this.

@media (max-width: 480px) {p {letter-spacing: -0.02em;line-height: 1.2;}}


has anyone figured out a way to scale the tracking and line-height together without breaking the vertical rhythm?


File: 1791659507158.jpg (84.6 KB, 1024x1024, img_1791659498265_oixjunr6.jpg)ImgOps Exif Google Yandex

99d1c No.2203[Reply]

i was looking at some old client handoffs today and it's honestly so frustrating when devs still hardcode specific pixel breakpoints instead of letting the content dictate where the layout breaks. it makes the whole experience feel brittle because you end up with these weird gaps or awkward text wrapping on anything that doesn't hit those exact dimensions. we should be designing for ranges of content rather than trying to predict every single device width out there. do you guys find yourselves fighting against fixed breakpoints in your current sprints?

99d1c No.2230

>>2203
those weird gaps drive me crazy too. i dealt with a site last week that had a massive white margin on tablets because they set a breakpoint at exactly 768px and nothing else. it looked totally broken on anything even slightly different. hardcoding values just makes the css such a nightmare to maintain when things change. tbh it's way easier to use min-content or max-content and just let the elements breathe. i've started using clamp for almost everything lately to avoid this mess.

99d1c No.2233

>>2230
>it's way easier to use min-content or max-content and just let the elements breathe
using content-based sizing is great until you get a long string of nonsense text without spaces that totally nukes your layout. i had a 'client' try to pass off some gibberish string as a product name and it broke the entire grid because there was no overflow rule.



File: 1792155550768.jpg (103.11 KB, 1024x1024, img_1792155543637_6f4464zs.jpg)ImgOps Exif Google Yandex

0771c No.2232[Reply]

i'm tired of seeing people hardcode margin-left everywhere like we aren't writing internationalized sites. if you're swapping to rtl layouts, using margin-inline-start saves a massive headache with your stylesheets. it's way cleaner than rewriting every single media query just to flip the direction.
.card {margin-inline-start: 20px;padding-inline-end: 15px;}

anyone still using margin-left for everything?


File: 1791990931312.jpg (230.44 KB, 1024x1024, img_1791990923003_kdi068yd.jpg)ImgOps Exif Google Yandex

ee34f No.2223[Reply]

The middle part of the process is basically disappearing.
>the design process kept growing while the time left for making the product kept shrinking.
It's weird because the heavy lifting on components and assets feels like it's being automated away, leaving only the high-level strategy or the tiny manual tweaks. I don't see how we maintain any consistency if nobody is actually building out the middle layers anymore.

more here: https://uxdesign.cc/ai-is-hollowing-out-the-middle-of-design-leaving-an-hourglass-behind-b7069db250fd?source=rss----138adf9c44c---4

ee34f No.2231

>>2223
The heavy lifting part is exactly what's killing my interest in new projects lately. My last sprint was basically just staring at a Figma plugin and clicking buttons until the layout looked okay, which feels more like QA than actual design.



File: 1792113054417.jpg (93.36 KB, 1024x1024, img_1792113014975_vj985cwq.jpg)ImgOps Exif Google Yandex

bd070 No.2229[Reply]

tried switching all my margin-right values to percentage units to match the container flow. it's a nightmare when you have an element with a fixed border-width because the math just breaks. using margin-right: calc(10% - 20px) is much more predictable than pretending percentages work for everything. tbh just stick to calc if you want things to actually line up without a headache


File: 1791536355367.jpg (269.96 KB, 1024x1024, img_1791536347673_715faa34.jpg)ImgOps Exif Google Yandex

5ae5c No.2198[Reply]

Been seeing too many people setting width to 100% without any max-width. It makes the image huge on desktop monitors and just looks broken. I usually stick to this for my main hero assets:
img {width: 100%;max-width: 800px;}

It keeps things from looking stretched pixelated when the viewport gets massive.

5ae5c No.2227

>>2198
setting a hard 800px cap is gonna break your layout on high-res displays. better to use object-fit: cover and just let the container handle the scaling via aspect-ratio. react devs love breaking things



File: 1792076697336.jpg (103.89 KB, 1080x720, img_1792076688909_4hsf5v4a.jpg)ImgOps Exif Google Yandex

e31bc No.2226[Reply]

trying to get my cards to align their headers perfectly but the content height is all over the place. even with subgrid enabled on the child items, it's not grabbing the row tracks from the parent correctly. i tried setting the grid-template-rows to match the main container but everything just collapses.
.card {display: grid;grid-template-rows: subgrid;}

tbh it feels like the browser is just ignoring the tracks when the parent has dynamic content. i've tried setting a fixed min-height on the rows but that's a terrible hack for a fluid layout. some weird overlap happening with the footer too.


File: 1792033632516.jpg (79.5 KB, 1024x1024, img_1792033624121_mdrpvsjg.jpg)ImgOps Exif Google Yandex

b53bf No.2225[Reply]

i'm working on this landing page for a client and it's driving me crazy. the hero section keeps jumping around when the address bar hides or shows while scrolling. i tried using height: 100vh; but that just makes the bottom of the image get cut off by the browser ui. i even tried switching to height: 100dvh; like everyone says, but now my footer is acting all weird and overlapping the content on some older ios versions. ngl it's a mess right now. been trying to use a little bit of javascript to calculate the actual window height manually but that feels so hacky heavy for a simple hero. has anyone actually found a way to make this consistent without breaking the layout on safari?


Delete Post [ ]
Previous [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 ]