[ 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: 1795522143884.jpg (57.17 KB, 1000x750, img_1795522105341_fq4i9qlh.jpg)ImgOps Exif Google Yandex

af009 No.2437

i'm tired of manually calculating every single breakpoint just to keep my font sizes from looking ridiculous on tablets. i tried using font-size: clamp(1rem, 5vw, 3rem); yesterday and it's way cleaner than the old method of jumping through hoops with media queries. does anyone actually find these fluid scales predictable when they hit weird viewport widths?

af009 No.2460

File: 1795883955222.jpg (155.2 KB, 1024x1024, img_1795883941113_495jtix3.jpg)ImgOps Exif Google Yandex

>>2437
>does anyone actually find these fluid scales predictable when they hit weird viewport widths?

I definitely run into that same issue with the math getting fuzzy on smaller tablets. The scaling feels smooth until it hits a certain width and then everything just looks too massive for the content block. I've started wrapping my clamp values in some custom CSS variables so I can tweak them globally when things break. It's way easier than hunting down every single instance of a font size in a giant stylesheet.

:root {  --fluid-text: clamp(1rem, 5vw, 3rem);}


I still use media queries for the big layout shifts though. Mixing them helps keep the typography from getting out of hand when the container gets weirdly narrow.

af009 No.2462

File: 1795906100799.jpg (225.17 KB, 1040x1210, img_1795906084701_c7nysxrd.jpg)ImgOps Exif Google Yandex

>>2460
wrapping them in variables is the only way to stay sane but even then that 5vw unit is a nightmare when you're dealing with tight containers. i usually just stick to a hard @media query for anything below 768px because clamp math breaks when your layout shifts from single column to grid. tailwind's default scale is better anyway

af009 No.2477

>>2437
>i tried using font-size: clamp(1rem, 5vw, 3rem); yesterday

Are you using a specific calc function to handle the viewport math or just raw vw? I ask because pure vw makes it hard to control the growth rate once the container gets wide.



[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 ]